launch wizard if user opens an unfinished wallet
This commit is contained in:
@@ -267,9 +267,31 @@ class ElectrumWindow(QMainWindow):
|
|||||||
|
|
||||||
# close current wallet
|
# close current wallet
|
||||||
self.close_wallet()
|
self.close_wallet()
|
||||||
# load new wallet
|
|
||||||
wallet = Wallet(storage)
|
# read wizard action
|
||||||
wallet.start_threads(self.network)
|
try:
|
||||||
|
wallet = Wallet(storage)
|
||||||
|
except BaseException as e:
|
||||||
|
QMessageBox.warning(None, _('Warning'), str(e), _('OK'))
|
||||||
|
return
|
||||||
|
action = wallet.get_action()
|
||||||
|
|
||||||
|
# run wizard
|
||||||
|
if action is not None:
|
||||||
|
import installwizard
|
||||||
|
wizard = installwizard.InstallWizard(self.config, self.network, storage)
|
||||||
|
try:
|
||||||
|
wallet = wizard.run(action)
|
||||||
|
except BaseException as e:
|
||||||
|
traceback.print_exc(file=sys.stdout)
|
||||||
|
QMessageBox.information(None, _('Error'), str(e), _('OK'))
|
||||||
|
return
|
||||||
|
if not wallet:
|
||||||
|
return
|
||||||
|
else:
|
||||||
|
wallet.start_threads(self.network)
|
||||||
|
|
||||||
|
# load new wallet in gui
|
||||||
self.load_wallet(wallet)
|
self.load_wallet(wallet)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user