simplification
This commit is contained in:
parent
b44640015a
commit
1fc23c6fe1
|
@ -93,13 +93,12 @@ def restore_create_dialog(wallet):
|
||||||
|
|
||||||
is_recovery = (r==1)
|
is_recovery = (r==1)
|
||||||
|
|
||||||
|
# ask for the server.
|
||||||
|
if not run_network_dialog( wallet, parent=None ): return False
|
||||||
|
|
||||||
if not is_recovery:
|
if not is_recovery:
|
||||||
|
|
||||||
wallet.new_seed(None)
|
wallet.new_seed(None)
|
||||||
|
|
||||||
# ask for the server.
|
|
||||||
run_network_dialog( wallet, parent=None )
|
|
||||||
|
|
||||||
# generate first key
|
# generate first key
|
||||||
wallet.synchronize()
|
wallet.synchronize()
|
||||||
|
|
||||||
|
@ -109,9 +108,6 @@ def restore_create_dialog(wallet):
|
||||||
#ask for password
|
#ask for password
|
||||||
change_password_dialog(wallet, None, None)
|
change_password_dialog(wallet, None, None)
|
||||||
else:
|
else:
|
||||||
# ask for the server.
|
|
||||||
run_network_dialog( wallet, parent=None )
|
|
||||||
|
|
||||||
# ask for seed and gap.
|
# ask for seed and gap.
|
||||||
run_recovery_dialog( wallet )
|
run_recovery_dialog( wallet )
|
||||||
|
|
||||||
|
@ -137,7 +133,7 @@ def restore_create_dialog(wallet):
|
||||||
thread.start_new_thread( recover_thread, ( wallet, dialog ) )
|
thread.start_new_thread( recover_thread, ( wallet, dialog ) )
|
||||||
r = dialog.run()
|
r = dialog.run()
|
||||||
dialog.destroy()
|
dialog.destroy()
|
||||||
if r==gtk.RESPONSE_CANCEL: sys.exit(1)
|
if r==gtk.RESPONSE_CANCEL: return False
|
||||||
if not wallet.is_found:
|
if not wallet.is_found:
|
||||||
show_message("No transactions found for this seed")
|
show_message("No transactions found for this seed")
|
||||||
|
|
||||||
|
@ -336,10 +332,7 @@ def run_network_dialog( wallet, parent ):
|
||||||
dialog.destroy()
|
dialog.destroy()
|
||||||
|
|
||||||
if r==gtk.RESPONSE_CANCEL:
|
if r==gtk.RESPONSE_CANCEL:
|
||||||
if parent == None:
|
return False
|
||||||
sys.exit(1)
|
|
||||||
else:
|
|
||||||
return
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if ':' in hh:
|
if ':' in hh:
|
||||||
|
@ -350,14 +343,12 @@ def run_network_dialog( wallet, parent ):
|
||||||
port = 50000
|
port = 50000
|
||||||
except:
|
except:
|
||||||
show_message("error")
|
show_message("error")
|
||||||
if parent == None:
|
return False
|
||||||
sys.exit(1)
|
|
||||||
else:
|
|
||||||
return
|
|
||||||
|
|
||||||
wallet.interface.set_server(host, port)
|
wallet.interface.set_server(host, port)
|
||||||
if parent:
|
if parent:
|
||||||
wallet.save()
|
wallet.save()
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue