mirror of
https://github.com/LBRYFoundation/lbry-sdk.git
synced 2025-08-23 17:27:25 +00:00
default to None for all values in wallet_status when wallet_manager not started yet
This commit is contained in:
parent
a5d06fb4a4
commit
f9aa95c987
2 changed files with 2 additions and 2 deletions
|
@ -1342,7 +1342,7 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||||
Dictionary of wallet status information.
|
Dictionary of wallet status information.
|
||||||
"""
|
"""
|
||||||
if self.wallet_manager is None:
|
if self.wallet_manager is None:
|
||||||
return {'is_encrypted': None, 'is_syncing': True, 'is_locked': None}
|
return {'is_encrypted': None, 'is_syncing': None, 'is_locked': None}
|
||||||
wallet = self.wallet_manager.get_wallet_or_default(wallet_id)
|
wallet = self.wallet_manager.get_wallet_or_default(wallet_id)
|
||||||
return {
|
return {
|
||||||
'is_encrypted': wallet.is_encrypted,
|
'is_encrypted': wallet.is_encrypted,
|
||||||
|
|
|
@ -33,7 +33,7 @@ class WalletCommands(CommandTestCase):
|
||||||
# when component manager hasn't started yet
|
# when component manager hasn't started yet
|
||||||
wallet.wallet_manager = None
|
wallet.wallet_manager = None
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
{'is_encrypted': None, 'is_syncing': True, 'is_locked': None},
|
{'is_encrypted': None, 'is_syncing': None, 'is_locked': None},
|
||||||
self.daemon.jsonrpc_wallet_status()
|
self.daemon.jsonrpc_wallet_status()
|
||||||
)
|
)
|
||||||
wallet.wallet_manager = wallet_manager
|
wallet.wallet_manager = wallet_manager
|
||||||
|
|
Loading…
Add table
Reference in a new issue