fix(@desktop/wallet): no notification after deleting keyapir

Fixes: #11866
This commit is contained in:
Sale Djenic 2023-08-11 10:51:00 +02:00 committed by saledjenic
parent 52fed9d5c2
commit 7a1500a365
1 changed files with 3 additions and 2 deletions

View File

@ -405,8 +405,9 @@ proc deleteKeypair*(self: Service, keyUid: string) =
error "status-go error", procName="deleteKeypair", errCode=response.error.code, errDesription=response.error.message
return
self.updateAccountsPositions()
for acc in kp.accounts:
self.removeAccountFromLocalStoreAndNotify(acc.address)
let addresses = kp.accounts.map(a => a.address)
for address in addresses:
self.removeAccountFromLocalStoreAndNotify(address)
self.events.emit(SIGNAL_KEYPAIR_DELETED, KeypairArgs(keyPairName: kp.name))
except Exception as e:
error "error: ", procName="deleteKeypair", errName = e.name, errDesription = e.msg