Skip to content

Commit

Permalink
kivy wizard: checkum bip39 seeds, because the virtual keyboard impose…
Browse files Browse the repository at this point in the history
…s the English wordlist
  • Loading branch information
ecdsa committed Jan 2, 2021
1 parent b2ab2a9 commit 07b0873
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion electrum/gui/kivy/uix/dialogs/installwizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,13 @@ def get_suggestions(self, prefix):
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()
Expand Down

0 comments on commit 07b0873

Please sign in to comment.