From 91b3a4a5dc40550b582af118d7b3ddc2b044ba7b Mon Sep 17 00:00:00 2001 From: f321x Date: Wed, 17 Dec 2025 17:17:56 +0100 Subject: [PATCH] daemon: reset CURRENT_WALLET if the wallet gets deleted Set SimpleConfig.CURRENT_WALLET = None if the wallet gets deleted, otherwise we try to open it on the next startup which will show an error message in QML. --- electrum/daemon.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/electrum/daemon.py b/electrum/daemon.py index b1ab1e84d..9c5c9d2e4 100644 --- a/electrum/daemon.py +++ b/electrum/daemon.py @@ -562,6 +562,8 @@ class Daemon(Logger): if os.path.exists(path): os.unlink(path) self.update_recently_opened_wallets(path, remove=True) + if self.config.CURRENT_WALLET == path: + self.config.CURRENT_WALLET = None return True return False