mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-31 09:21:39 +00:00
commands/jsonrpc: fix specifying "wallet" to commands that need it
This commit is contained in:
parent
2ca535225d
commit
ad5c6284c4
1 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue