forked from LBRYCommunity/lbry-sdk
save async
This commit is contained in:
parent
5e3b8cb7ea
commit
e4f37a7891
1 changed files with 3 additions and 3 deletions
|
@ -116,9 +116,9 @@ class WalletManager:
|
|||
def add(self, wallet: Wallet) -> Wallet:
|
||||
self.wallets[wallet.id] = wallet
|
||||
|
||||
def wallet_change_handler(event):
|
||||
self.storage.save(wallet)
|
||||
asyncio.create_task(self._on_change_controller.add(event))
|
||||
async def wallet_change_handler(event):
|
||||
await self.storage.save(wallet)
|
||||
await self._on_change_controller.add(event)
|
||||
wallet.on_change.listen(wallet_change_handler)
|
||||
|
||||
return wallet
|
||||
|
|
Loading…
Reference in a new issue