Browse Source

kivy wizard: checkum bip39 seeds, because the virtual keyboard imposes the English wordlist

patch-4
ThomasV 4 years ago
parent
commit
07b08738a8
  1. 8
      electrum/gui/kivy/uix/dialogs/installwizard.py

8
electrum/gui/kivy/uix/dialogs/installwizard.py

@ -894,7 +894,13 @@ class RestoreSeedDialog(WizardDialog):
yield w
def update_next_button(self):
self.ids.next.disabled = False if self.is_bip39 else not bool(self._test(self.get_text()))
from electrum.keystore import bip39_is_checksum_valid
text = self.get_text()
if self.is_bip39:
is_seed, is_wordlist = bip39_is_checksum_valid(text)
else:
is_seed = bool(self._test(text))
self.ids.next.disabled = not is_seed
def on_text(self, dt):
self.update_next_button()

Loading…
Cancel
Save