subscribe accounts on wallet_add

This commit is contained in:
Lex Berezhny 2019-10-30 14:06:20 -04:00
parent 1391c1d607
commit a5ee60c1c9

View file

@ -1127,7 +1127,11 @@ class Daemon(metaclass=JSONRPCServerType):
raise Exception(f"Wallet at path '{wallet_path}' is already loaded.")
if not os.path.exists(wallet_path):
raise Exception(f"Wallet at path '{wallet_path}' was not found.")
return self.wallet_manager.import_wallet(wallet_path)
wallet = self.wallet_manager.import_wallet(wallet_path)
if self.ledger.network.is_connected:
for account in wallet.accounts:
await self.ledger.subscribe_account(account)
return wallet
@requires("wallet")
def jsonrpc_wallet_remove(self, wallet_id):