1
0

payserver: make daemon_wallet_loaded hook reliable

daemon.load_wallet() often early-returns,
e.g. in Qt case, for storage-encrypted wallets.

closes https://github.com/spesmilo/electrum/issues/8118
This commit is contained in:
SomberNight
2023-01-13 00:58:02 +00:00
parent 9a0fff2571
commit 9039ec1dc4
2 changed files with 11 additions and 13 deletions

View File

@@ -456,8 +456,7 @@ class Daemon(Logger):
if wallet is None:
return
wallet.start_network(self.network)
self._wallets[path] = wallet
run_hook('daemon_wallet_loaded', self, wallet)
self.add_wallet(wallet)
return wallet
@staticmethod
@@ -492,6 +491,7 @@ class Daemon(Logger):
path = wallet.storage.path
path = standardize_path(path)
self._wallets[path] = wallet
run_hook('daemon_wallet_loaded', self, wallet)
def get_wallet(self, path: str) -> Optional[Abstract_Wallet]:
path = standardize_path(path)