mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-31 17:31:36 +00:00
better messages
This commit is contained in:
parent
7f30573027
commit
8583f6a560
1 changed files with 9 additions and 13 deletions
|
@ -528,7 +528,10 @@ class ElectrumWindow(QMainWindow):
|
||||||
conf_pw.setEchoMode(2)
|
conf_pw.setEchoMode(2)
|
||||||
|
|
||||||
vbox = QVBoxLayout()
|
vbox = QVBoxLayout()
|
||||||
msg = 'Your wallet is encrypted. Use this dialog to change your password.\nTo disable wallet encryption, enter an empty new password.' if wallet.use_encryption else 'Your wallet keys are not encrypted'
|
if parent:
|
||||||
|
msg = 'Your wallet is encrypted. Use this dialog to change your password.\nTo disable wallet encryption, enter an empty new password.' if wallet.use_encryption else 'Your wallet keys are not encrypted'
|
||||||
|
else:
|
||||||
|
msg = "Please choose a password to encrypt your wallet keys.\nLeave these fields empty if you want to disable encryption."
|
||||||
vbox.addWidget(QLabel(msg))
|
vbox.addWidget(QLabel(msg))
|
||||||
|
|
||||||
grid = QGridLayout()
|
grid = QGridLayout()
|
||||||
|
@ -652,7 +655,7 @@ class ElectrumWindow(QMainWindow):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def network_dialog(wallet, parent=None):
|
def network_dialog(wallet, parent=None):
|
||||||
|
|
||||||
if True:
|
if parent:
|
||||||
if wallet.interface.is_connected:
|
if wallet.interface.is_connected:
|
||||||
status = "Connected to %s.\n%d blocks\nresponse time: %f"%(wallet.interface.host, wallet.interface.blocks, wallet.interface.rtime)
|
status = "Connected to %s.\n%d blocks\nresponse time: %f"%(wallet.interface.host, wallet.interface.blocks, wallet.interface.rtime)
|
||||||
else:
|
else:
|
||||||
|
@ -704,7 +707,6 @@ class ElectrumWindow(QMainWindow):
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class ElectrumGui():
|
class ElectrumGui():
|
||||||
|
|
||||||
def __init__(self, wallet):
|
def __init__(self, wallet):
|
||||||
|
@ -719,10 +721,11 @@ class ElectrumGui():
|
||||||
|
|
||||||
is_recovery = (r==1)
|
is_recovery = (r==1)
|
||||||
wallet = self.wallet
|
wallet = self.wallet
|
||||||
|
# ask for the server.
|
||||||
|
if not ElectrumWindow.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.
|
|
||||||
ElectrumWindow.network_dialog(wallet)
|
|
||||||
# generate first key
|
# generate first key
|
||||||
wallet.synchronize()
|
wallet.synchronize()
|
||||||
# run a dialog indicating the seed, ask the user to remember it
|
# run a dialog indicating the seed, ask the user to remember it
|
||||||
|
@ -730,13 +733,8 @@ class ElectrumGui():
|
||||||
#ask for password
|
#ask for password
|
||||||
ElectrumWindow.change_password_dialog(wallet)
|
ElectrumWindow.change_password_dialog(wallet)
|
||||||
else:
|
else:
|
||||||
# ask for the server.
|
|
||||||
r = ElectrumWindow.network_dialog( wallet, parent=None )
|
|
||||||
if not r: return False
|
|
||||||
# ask for seed and gap.
|
# ask for seed and gap.
|
||||||
r = ElectrumWindow.seed_dialog( wallet )
|
if not ElectrumWindow.seed_dialog( wallet ): return False
|
||||||
if not r: return False
|
|
||||||
|
|
||||||
wallet.init_mpk( wallet.seed ) # not encrypted at this point
|
wallet.init_mpk( wallet.seed ) # not encrypted at this point
|
||||||
wallet.synchronize()
|
wallet.synchronize()
|
||||||
|
|
||||||
|
@ -753,9 +751,7 @@ class ElectrumGui():
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def main(self):
|
def main(self):
|
||||||
|
|
||||||
s = Sender()
|
s = Sender()
|
||||||
s.start()
|
s.start()
|
||||||
w = ElectrumWindow(self.wallet)
|
w = ElectrumWindow(self.wallet)
|
||||||
|
|
Loading…
Add table
Reference in a new issue