Browse Source

fix qt seed dialog (follow-up af86c7e3fd)

ln-negative-red
SomberNight 5 years ago
parent
commit
6e3875ceab
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 2
      electrum/gui/qt/seed_dialog.py
  2. 2
      electrum/mnemonic.py

2
electrum/gui/qt/seed_dialog.py

@ -152,7 +152,7 @@ class SeedLayout(QVBoxLayout):
bip39_english_list = Mnemonic('en').wordlist bip39_english_list = Mnemonic('en').wordlist
old_list = electrum.old_mnemonic.words old_list = electrum.old_mnemonic.words
only_old_list = set(old_list) - set(bip39_english_list) only_old_list = set(old_list) - set(bip39_english_list)
self.wordlist = bip39_english_list + list(only_old_list) # concat both lists self.wordlist = list(bip39_english_list) + list(only_old_list) # concat both lists
self.wordlist.sort() self.wordlist.sort()
class CompleterDelegate(QStyledItemDelegate): class CompleterDelegate(QStyledItemDelegate):

2
electrum/mnemonic.py

@ -93,7 +93,7 @@ def normalize_text(seed: str) -> str:
_WORDLIST_CACHE = {} _WORDLIST_CACHE = {}
def load_wordlist(filename): def load_wordlist(filename) -> tuple:
path = resource_path('wordlist', filename) path = resource_path('wordlist', filename)
if path not in _WORDLIST_CACHE: if path not in _WORDLIST_CACHE:
with open(path, 'r', encoding='utf-8') as f: with open(path, 'r', encoding='utf-8') as f:

Loading…
Cancel
Save