commit 07b08738a8269e075faff3da9db336f0f26afd12 parent b2ab2a9f6a086cc7cd38ba17b2d211288c81e940 Author: ThomasV <thomasv@electrum.org> Date: Sat, 2 Jan 2021 16:38:05 +0100 kivy wizard: checkum bip39 seeds, because the virtual keyboard imposes the English wordlist Diffstat:
M | electrum/gui/kivy/uix/dialogs/installwizard.py | | | 8 | +++++++- |
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/electrum/gui/kivy/uix/dialogs/installwizard.py b/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()