1
0

qml: don't rely on wallet when deactivating PIN and no wallet loaded (fixes #8366)

This commit is contained in:
Sander van Grieken
2024-05-30 15:23:25 +02:00
parent ef536493ee
commit 8085c41cfb
2 changed files with 11 additions and 1 deletions

View File

@@ -629,6 +629,16 @@ ApplicationWindow
function handleAuthRequired(qtobject, method, authMessage) {
console.log('auth using method ' + method)
if (method == 'wallet_else_pin') {
// if no wallet loaded, delegate to pin auth, else use wallet password auth
if (!Daemon.currentWallet) {
method = 'pin'
} else {
method = 'wallet'
}
}
if (method == 'wallet') {
if (Daemon.currentWallet.verifyPassword('')) {
// wallet has no password

View File

@@ -138,7 +138,7 @@ class QEConfig(AuthMixin, QObject):
self.config.CONFIG_PIN_CODE = pin_code
self.pinCodeChanged.emit()
@auth_protect(method='wallet')
@auth_protect(method='wallet_else_pin')
def pinCodeRemoveAuth(self):
self.config.CONFIG_PIN_CODE = ""
self.pinCodeChanged.emit()