tkivy: handle 2FA seeds - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 827d928aaa5ae30c028a021dfd6b71870eda9df5 DIR parent 06c68a4be1ab0ea734f9d46e5146b80c7d1e644a HTML Author: ThomasV <thomasv@electrum.org> Date: Wed, 28 Sep 2016 12:48:46 +0200 kivy: handle 2FA seeds Diffstat: M gui/kivy/uix/dialogs/installwizard… | 4 ++-- M lib/base_wizard.py | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) --- DIR diff --git a/gui/kivy/uix/dialogs/installwizard.py b/gui/kivy/uix/dialogs/installwizard.py t@@ -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) t@@ -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() DIR diff --git a/lib/base_wizard.py b/lib/base_wizard.py t@@ -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