diff --git a/electrum/gui/qml/components/main.qml b/electrum/gui/qml/components/main.qml index 298c4010f..063f3d4c0 100644 --- a/electrum/gui/qml/components/main.qml +++ b/electrum/gui/qml/components/main.qml @@ -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 diff --git a/electrum/gui/qml/qeconfig.py b/electrum/gui/qml/qeconfig.py index 2330637f3..7eb6c9715 100644 --- a/electrum/gui/qml/qeconfig.py +++ b/electrum/gui/qml/qeconfig.py @@ -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()