mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-31 17:31:36 +00:00
handle exceptions returned by update_password
This commit is contained in:
parent
b4f353291a
commit
b5c0cc6190
1 changed files with 8 additions and 1 deletions
|
@ -1584,7 +1584,14 @@ class ElectrumWindow(QMainWindow):
|
|||
QMessageBox.warning(parent, _('Error'), _('Passwords do not match'), _('OK'))
|
||||
return ElectrumWindow.change_password_dialog(wallet, parent) # Retry
|
||||
|
||||
wallet.update_password(seed, password, new_password)
|
||||
try:
|
||||
wallet.update_password(seed, password, new_password)
|
||||
except:
|
||||
QMessageBox.warning(parent, _('Error'), _('Failed to update password'), _('OK'))
|
||||
return
|
||||
|
||||
QMessageBox.information(parent, _('Success'), _('Password was updated successfully'), _('OK'))
|
||||
|
||||
if parent:
|
||||
icon = QIcon(":icons/lock.png") if wallet.use_encryption else QIcon(":icons/unlock.png")
|
||||
parent.password_button.setIcon( icon )
|
||||
|
|
Loading…
Add table
Reference in a new issue