mirror of
https://github.com/JoinMarket-Org/joinmarket-clientserver.git
synced 2026-08-14 12:43:38 +02:00
Check for empty password and cancellation in JoinMarket-Qt wallet generation
This commit is contained in:
parent
90607ed961
commit
5d66d9410f
1 changed files with 10 additions and 2 deletions
|
|
@ -1464,13 +1464,21 @@ class JMMainWindow(QMainWindow):
|
|||
def getPassword(self):
|
||||
pd = PasswordDialog()
|
||||
while True:
|
||||
pd.exec_()
|
||||
if pd.new_pw.text() != pd.conf_pw.text():
|
||||
pd_return = pd.exec_()
|
||||
if pd_return == QDialog.Rejected:
|
||||
return None
|
||||
elif pd.new_pw.text() != pd.conf_pw.text():
|
||||
JMQtMessageBox(self,
|
||||
"Passwords don't match.",
|
||||
mbtype='warn',
|
||||
title="Error")
|
||||
continue
|
||||
elif pd.new_pw.text() == "":
|
||||
JMQtMessageBox(self,
|
||||
"Password must not be empty.",
|
||||
mbtype='warn',
|
||||
title="Error")
|
||||
continue
|
||||
break
|
||||
self.textpassword = str(pd.new_pw.text())
|
||||
return self.textpassword.encode('utf-8')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue