1
0

qml: report unified password change failure, impose minimum password length of 5, disallow empty passwords

This commit is contained in:
Sander van Grieken
2023-03-03 12:56:02 +01:00
parent 90355a150f
commit 0f596cf2e9
3 changed files with 21 additions and 16 deletions

View File

@@ -508,18 +508,23 @@ Pane {
app.stack.pop()
}
function onRequestNewPassword() { // new unified password (all wallets)
var dialog = app.passwordDialog.createObject(app,
{
'confirmPassword': true,
'title': qsTr('Enter new password'),
'infotext': qsTr('If you forget your password, you\'ll need to\
restore from seed. Please make sure you have your seed stored safely')
} )
var dialog = app.passwordDialog.createObject(app, {
confirmPassword: true,
title: qsTr('Enter new password'),
infotext: qsTr('If you forget your password, you\'ll need to restore from seed. Please make sure you have your seed stored safely')
})
dialog.accepted.connect(function() {
Daemon.setPassword(dialog.password)
})
dialog.open()
}
function onPasswordChangeFailed() {
var dialog = app.messageDialog.createObject(app, {
title: qsTr('Error'),
text: qsTr('Password change failed')
})
dialog.open()
}
function onWalletDeleteError(code, message) {
if (code == 'unpaid_requests') {
var dialog = app.messageDialog.createObject(app, {text: message, yesno: true })
@@ -544,9 +549,9 @@ Pane {
target: Daemon.currentWallet
function onRequestNewPassword() { // new wallet password
var dialog = app.passwordDialog.createObject(app, {
'confirmPassword': true,
'title': qsTr('Enter new password'),
'infotext': qsTr('If you forget your password, you\'ll need to restore from seed. Please make sure you have your seed stored safely')
confirmPassword: true,
title: qsTr('Enter new password'),
infotext: qsTr('If you forget your password, you\'ll need to restore from seed. Please make sure you have your seed stored safely')
})
dialog.accepted.connect(function() {
Daemon.currentWallet.set_password(dialog.password)