Multisig: create and restore work

Override run in derived class to catch UserCancelled again
Restore self.finished() hook.
Fix a typo.
This commit is contained in:
Neil Booth 2016-01-13 22:38:32 +09:00
parent 2f6e2ebcd2
commit 889c4cb7fb
2 changed files with 5 additions and 4 deletions

View File

@ -150,13 +150,12 @@ class InstallWizard(WindowModalDialog, WizardBase):
self.app.processEvents()
self.app.processEvents()
@classmethod
def open_wallet(self, *args):
def run(self, *args):
'''Wrap the base wizard implementation with try/except blocks
to give a sensible error message to the user.'''
wallet = None
try:
wallet = InstallWizard.open_wallet(self, *args)
wallet = WizardBase.run(self, *args)
except UserCancelled:
self.print_error("wallet creation cancelled by user")
return wallet
@ -277,7 +276,7 @@ class InstallWizard(WindowModalDialog, WizardBase):
layout = SeedDisplayLayout(xpub_hot, title=MSG_SHOW_MPK, sid='hot')
else:
layout = SeedInputLayout(title=MSG_ENTER_SEED_OR_MPK, sid='hot')
entries.append(slayout.seed_edit())
entries.append(layout.seed_edit())
innerVbox.addLayout(layout.layout())
for i in range(n):

View File

@ -167,6 +167,8 @@ class WizardBase(PrintError):
if is_restore:
self.show_restore(wallet, network)
self.finished()
return wallet
def run_wallet_action(self, wallet, action):