kivy: handle 2FA seeds

This commit is contained in:
ThomasV 2016-09-28 12:48:46 +02:00
parent 06c68a4be1
commit 827d928aaa
2 changed files with 8 additions and 4 deletions

View File

@ -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()

View File

@ -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