From 889c4cb7fb77bd05b1fc71286ffbe095226f38a4 Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Wed, 13 Jan 2016 22:38:32 +0900 Subject: [PATCH] Multisig: create and restore work Override run in derived class to catch UserCancelled again Restore self.finished() hook. Fix a typo. --- gui/qt/installwizard.py | 7 +++---- lib/wizard.py | 2 ++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/gui/qt/installwizard.py b/gui/qt/installwizard.py index c396f3c92..a2a2f6ff7 100644 --- a/gui/qt/installwizard.py +++ b/gui/qt/installwizard.py @@ -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): diff --git a/lib/wizard.py b/lib/wizard.py index 89a8ebb7e..8b6c9bec8 100644 --- a/lib/wizard.py +++ b/lib/wizard.py @@ -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):