fix issue #968
This commit is contained in:
parent
f57c581468
commit
9f9bab6cf0
|
@ -163,7 +163,12 @@ class ElectrumGui:
|
||||||
if action is not None:
|
if action is not None:
|
||||||
import installwizard
|
import installwizard
|
||||||
wizard = installwizard.InstallWizard(self.config, self.network, storage)
|
wizard = installwizard.InstallWizard(self.config, self.network, storage)
|
||||||
wallet = wizard.run(action)
|
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:
|
if not wallet:
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -389,13 +389,7 @@ class InstallWizard(QDialog):
|
||||||
wallet.add_master_public_key("x3/", xpub3)
|
wallet.add_master_public_key("x3/", xpub3)
|
||||||
|
|
||||||
elif action == 'create_accounts':
|
elif action == 'create_accounts':
|
||||||
try:
|
wallet.create_main_account(password)
|
||||||
wallet.create_main_account(password)
|
|
||||||
except BaseException as e:
|
|
||||||
import traceback
|
|
||||||
traceback.print_exc(file=sys.stdout)
|
|
||||||
QMessageBox.information(None, _('Error'), str(e), _('OK'))
|
|
||||||
return
|
|
||||||
self.waiting_dialog(wallet.synchronize)
|
self.waiting_dialog(wallet.synchronize)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -1296,6 +1296,8 @@ class BIP32_Wallet(Deterministic_Wallet):
|
||||||
raise InvalidPassword()
|
raise InvalidPassword()
|
||||||
|
|
||||||
def add_master_public_key(self, name, xpub):
|
def add_master_public_key(self, name, xpub):
|
||||||
|
if xpub in self.master_public_keys.values():
|
||||||
|
raise BaseException('Duplicate master public key')
|
||||||
self.master_public_keys[name] = xpub
|
self.master_public_keys[name] = xpub
|
||||||
self.storage.put('master_public_keys', self.master_public_keys, True)
|
self.storage.put('master_public_keys', self.master_public_keys, True)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue