1
0

Daemon: do not set config.CURRENT_WALLET to None

Instead, raise a UserFacingException if the daemon has several wallets in memory.
This commit is contained in:
ThomasV
2025-06-03 10:24:40 +02:00
parent 94517fbc0e
commit 972ebb0420
4 changed files with 14 additions and 17 deletions

View File

@@ -531,8 +531,7 @@ def handle_cmd(*, cmdname: str, config: 'SimpleConfig', config_options: dict):
# command line
configure_logging(config, log_to_file=False) # don't spam logfiles for each client-side RPC, but support "-v"
cmd = known_commands[cmdname]
use_fallback = (cmdname in ['create', 'restore', 'load_wallet'])
wallet_path = config.get_wallet_path(use_fallback=use_fallback)
wallet_path = config.get_wallet_path()
if cmd.requires_wallet and not wallet_path:
print_stderr('wallet path not provided')
sys_exit(1)