electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 827d928aaa5ae30c028a021dfd6b71870eda9df5
parent 06c68a4be1ab0ea734f9d46e5146b80c7d1e644a
Author: ThomasV <thomasv@electrum.org>
Date:   Wed, 28 Sep 2016 12:48:46 +0200

kivy: handle 2FA seeds

Diffstat:
Mgui/kivy/uix/dialogs/installwizard.py | 4++--
Mlib/base_wizard.py | 8++++++--
2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/gui/kivy/uix/dialogs/installwizard.py b/gui/kivy/uix/dialogs/installwizard.py @@ -724,7 +724,7 @@ class InstallWizard(BaseWizard, Widget): try: task() except Exception as err: - Clock.schedule_once(lambda dt: app.show_error(str(err))) + self.show_error(str(err)) # on completion hide message Clock.schedule_once(lambda dt: app.info_bubble.hide(now=True), -1) @@ -770,7 +770,7 @@ class InstallWizard(BaseWizard, Widget): def show_xpub_dialog(self, **kwargs): ShowXpubDialog(self, **kwargs).open() def show_error(self, msg): - app.show_error(msg, duration=0.5) + Clock.schedule_once(lambda dt: app.show_error(msg)) def password_dialog(self, message, callback): popup = PasswordDialog() diff --git a/lib/base_wizard.py b/lib/base_wizard.py @@ -275,8 +275,12 @@ class BaseWizard(object): elif seed_type == 'old': self.run('create_keystore', seed, passphrase) elif seed_type == '2fa': - self.load_2fa() - self.run('on_restore_seed', seed) + if self.is_kivy: + self.show_error('2FA seeds are not supported in this version') + self.run('restore_from_seed') + else: + self.load_2fa() + self.run('on_restore_seed', seed) else: raise