fix(@desktop/wallet): additional chat account visible when adding watch only account

Fixes: #11833
This commit is contained in:
Sale Djenic 2023-08-08 16:50:04 +02:00 committed by saledjenic
parent 72c3e1c971
commit a06cd4b8a5
1 changed files with 4 additions and 0 deletions

View File

@ -173,6 +173,8 @@ proc addNewKeypairsAccountsToLocalStoreAndNotify(self: Service, notify: bool = t
self.buildAllTokens(addresses, store = true)
for acc in kpDb.accounts:
acc.ens = getEnsName(acc.address, chainId)
if acc.isChat:
continue
if notify:
self.events.emit(SIGNAL_WALLET_ACCOUNT_SAVED, AccountArgs(account: acc))
else:
@ -186,6 +188,8 @@ proc addNewKeypairsAccountsToLocalStoreAndNotify(self: Service, notify: bool = t
continue
accDb.ens = getEnsName(accDb.address, chainId)
self.storeAccountToKeypair(accDb)
if accDb.isChat:
continue
self.buildAllTokens(@[accDb.address], store = true)
if notify:
self.events.emit(SIGNAL_WALLET_ACCOUNT_SAVED, AccountArgs(account: accDb))