From a5ee60c1c9eb8290ce819bf2652074d0bacff6e1 Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Wed, 30 Oct 2019 14:06:20 -0400 Subject: [PATCH] subscribe accounts on wallet_add --- lbry/lbry/extras/daemon/Daemon.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lbry/lbry/extras/daemon/Daemon.py b/lbry/lbry/extras/daemon/Daemon.py index 1855179a8..b3a44ca60 100644 --- a/lbry/lbry/extras/daemon/Daemon.py +++ b/lbry/lbry/extras/daemon/Daemon.py @@ -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):