default to None for all values in wallet_status when wallet_manager not started yet

This commit is contained in:
Lex Berezhny 2020-03-31 17:22:13 -04:00
parent a5d06fb4a4
commit f9aa95c987
2 changed files with 2 additions and 2 deletions

View file

@ -1342,7 +1342,7 @@ class Daemon(metaclass=JSONRPCServerType):
Dictionary of wallet status information.
"""
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)
return {
'is_encrypted': wallet.is_encrypted,

View file

@ -33,7 +33,7 @@ class WalletCommands(CommandTestCase):
# when component manager hasn't started yet
wallet.wallet_manager = None
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()
)
wallet.wallet_manager = wallet_manager