don't exit in wizard (fixes #402)
This commit is contained in:
parent
0a9ca37099
commit
5ae39b5ad1
|
@ -236,13 +236,10 @@ class InstallWizard(QDialog):
|
||||||
|
|
||||||
def show_seed(self, wallet):
|
def show_seed(self, wallet):
|
||||||
from seed_dialog import make_seed_dialog
|
from seed_dialog import make_seed_dialog
|
||||||
|
|
||||||
vbox = make_seed_dialog(wallet.get_mnemonic(None), wallet.imported_keys)
|
vbox = make_seed_dialog(wallet.get_mnemonic(None), wallet.imported_keys)
|
||||||
vbox.addLayout(ok_cancel_buttons(self, _("Next")))
|
vbox.addLayout(ok_cancel_buttons(self, _("Next")))
|
||||||
|
|
||||||
self.set_layout(vbox)
|
self.set_layout(vbox)
|
||||||
if not self.exec_():
|
return self.exec_()
|
||||||
exit()
|
|
||||||
|
|
||||||
|
|
||||||
def password_dialog(self, wallet):
|
def password_dialog(self, wallet):
|
||||||
|
@ -257,7 +254,8 @@ class InstallWizard(QDialog):
|
||||||
def run(self):
|
def run(self):
|
||||||
|
|
||||||
action = self.restore_or_create()
|
action = self.restore_or_create()
|
||||||
if not action: exit()
|
if not action:
|
||||||
|
return
|
||||||
|
|
||||||
wallet = Wallet(self.storage)
|
wallet = Wallet(self.storage)
|
||||||
gap = self.config.get('gap_limit', 5)
|
gap = self.config.get('gap_limit', 5)
|
||||||
|
@ -267,14 +265,14 @@ class InstallWizard(QDialog):
|
||||||
|
|
||||||
if action == 'create':
|
if action == 'create':
|
||||||
wallet.init_seed(None)
|
wallet.init_seed(None)
|
||||||
self.show_seed(wallet)
|
if not self.show_seed(wallet):
|
||||||
if self.verify_seed(wallet):
|
return
|
||||||
|
if not self.verify_seed(wallet):
|
||||||
|
return
|
||||||
def create():
|
def create():
|
||||||
wallet.save_seed()
|
wallet.save_seed()
|
||||||
wallet.synchronize() # generate first addresses offline
|
wallet.synchronize() # generate first addresses offline
|
||||||
self.waiting_dialog(create)
|
self.waiting_dialog(create)
|
||||||
else:
|
|
||||||
return
|
|
||||||
|
|
||||||
elif action == 'restore':
|
elif action == 'restore':
|
||||||
# ask for seed and gap.
|
# ask for seed and gap.
|
||||||
|
|
Loading…
Reference in New Issue