commit ad5c6284c41247527d43fa10626493ca75f15d53
parent 2ca535225d633b548111509db5bd5191819d8fe1
Author: SomberNight <somber.night@protonmail.com>
Date: Sat, 21 Dec 2019 07:00:30 +0100
commands/jsonrpc: fix specifying "wallet" to commands that need it
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/electrum/commands.py b/electrum/commands.py
@@ -106,7 +106,8 @@ def command(s):
daemon = cmd_runner.daemon
if daemon:
if (cmd.requires_wallet or 'wallet_path' in cmd.options) and kwargs.get('wallet_path') is None:
- kwargs['wallet_path'] = daemon.config.get_wallet_path()
+ # using JSON-RPC, sometimes the "wallet" kwarg needs to be used to specify a wallet
+ kwargs['wallet_path'] = kwargs.pop('wallet', None) or daemon.config.get_wallet_path()
if cmd.requires_wallet:
wallet_path = kwargs.pop('wallet_path')
wallet = daemon.get_wallet(wallet_path)