Skip to content

Commit

Permalink
Merge #611: Bugfix: mnemonic extension display in Qt generate
Browse files Browse the repository at this point in the history
7fe910a Bugfix: mnemonic extension display in Qt generate (Adam Gibson)
  • Loading branch information
AdamISZ committed Jun 28, 2020
2 parents 65216bb + 7fe910a commit afa1e23
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion jmclient/jmclient/wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -1245,7 +1245,11 @@ def initialize(cls, storage, network, max_mixdepth=2, timestamp=None,
storage, network, max_mixdepth, timestamp, entropy,
write=False, **kwargs)
if entropy_extension:
storage.data[cls._BIP39_EXTENSION_KEY] = entropy_extension
# Note: future reads from storage will retrieve this data
# as binary, so set it as binary on initialization for consistency.
# Note that this is in contrast to the mnemonic wordlist, which is
# handled by the mnemonic package, which returns the words as a string.
storage.data[cls._BIP39_EXTENSION_KEY] = entropy_extension.encode("utf-8")

if write:
storage.save()
Expand Down
3 changes: 2 additions & 1 deletion jmclient/jmclient/wallet_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,8 @@ def cli_get_wallet_file_name(defaultname="wallet.jmdat"):
def cli_display_user_words(words, mnemonic_extension):
text = 'Write down this wallet recovery mnemonic\n\n' + words +'\n'
if mnemonic_extension:
text += '\nAnd this mnemonic extension: ' + mnemonic_extension + '\n'
text += '\nAnd this mnemonic extension: ' + mnemonic_extension.decode(
'utf-8') + '\n'
jmprint(text, "important")

def cli_user_mnemonic_entry():
Expand Down

0 comments on commit afa1e23

Please sign in to comment.