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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user