From 5b915fbff8da5a6ed96f68dd81b8b946b272f0f2 Mon Sep 17 00:00:00 2001 From: SomberNight Date: Mon, 19 Jan 2026 16:41:57 +0000 Subject: [PATCH] qml: fix: allow opening passwordless wallets This must be an old regression. The GUI was not allowing to open a wallet that did not have a password set: it prompted for a password and did not accept any string (should at least accept empty ""). Without this, it was only possible to open a passwordless wallet if that was the first wallet the user opened (as otherwise we would overwrite the empty pw with the pw of the current wallet). --- electrum/gui/qml/qedaemon.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/electrum/gui/qml/qedaemon.py b/electrum/gui/qml/qedaemon.py index 311eebc18..587b19d3e 100644 --- a/electrum/gui/qml/qedaemon.py +++ b/electrum/gui/qml/qedaemon.py @@ -192,13 +192,16 @@ class QEDaemon(AuthMixin, QObject): self._logger.debug('load wallet ' + str(self._path)) - # map empty string password to None + # password unification helper: + # - if pw not given (None), try pw of current wallet. + # - but "" empty str passwords are kept as-is, to open passwordless wallets + if password is None: + password = self._password + + # map explicit empty str password to None. the backend disallows empty str passwords. if password == '': password = None - if not password: - password = self._password - wallet_already_open = self.daemon.get_wallet(self._path) if wallet_already_open is not None: password = QEWallet.getInstanceFor(wallet_already_open).password