From 3660bad243a226cae3a5632f47c7dc544384695a Mon Sep 17 00:00:00 2001 From: Anthony Laibe Date: Thu, 23 Sep 2021 10:00:03 +0200 Subject: [PATCH] fix(@desktop/wallet): emit wallet2 event fixes #3659 Wallet2 needs its own event otherwise they wallet1/2 mixes and as not everything is implemented in wallet2, it crashes In this particular case, the account is added into wallet1 but trigger an event intercepted by wallet2, wallet2 doesn't have the new account and crash --- src/app/wallet/v2/core.nim | 6 +++--- vendor/status-lib | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/wallet/v2/core.nim b/src/app/wallet/v2/core.nim index 5352f85924..01b0a8392e 100644 --- a/src/app/wallet/v2/core.nim +++ b/src/app/wallet/v2/core.nim @@ -40,15 +40,15 @@ proc init*(self: WalletController) = for account in accounts: self.view.addAccountToList(account) - self.status.events.on("accountsUpdated") do(e: Args): + self.status.events.on("wallet2_accountsUpdated") do(e: Args): self.view.updateView() - self.status.events.on("newAccountAdded") do(e: Args): + self.status.events.on("wallet2_newAccountAdded") do(e: Args): var account = WalletTypes.AccountArgs(e) self.view.addAccountToList(account.account) self.view.updateView() - self.status.events.on("cryptoServicesFetched") do(e: Args): + self.status.events.on("wallet2_cryptoServicesFetched") do(e: Args): var args = CryptoServicesArg(e) self.view.onCryptoServicesFetched(args.services) diff --git a/vendor/status-lib b/vendor/status-lib index cdb06facdd..fbda20256f 160000 --- a/vendor/status-lib +++ b/vendor/status-lib @@ -1 +1 @@ -Subproject commit cdb06facdd751d1dc69f57f7271ff2796228975f +Subproject commit fbda20256f15b871f389b50d246f73317c8b5799