tcommands/jsonrpc: fix specifying "wallet" to commands that need it - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit ad5c6284c41247527d43fa10626493ca75f15d53 DIR parent 2ca535225d633b548111509db5bd5191819d8fe1 HTML 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: M electrum/commands.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- DIR diff --git a/electrum/commands.py b/electrum/commands.py t@@ -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)