mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-09 05:52:41 +00:00
fix(@desktop/wallet): fixed crash while handling received removed account from a paired device
This commit is contained in:
parent
c469cb32d3
commit
3113fffef9
@ -607,8 +607,9 @@ proc handleKeypair(self: Service, keypair: KeypairDto) =
|
|||||||
localKp.lastUsedDerivationIndex = keypair.lastUsedDerivationIndex
|
localKp.lastUsedDerivationIndex = keypair.lastUsedDerivationIndex
|
||||||
localKp.syncedFrom = keypair.syncedFrom
|
localKp.syncedFrom = keypair.syncedFrom
|
||||||
# - first remove removed accounts from the UI
|
# - first remove removed accounts from the UI
|
||||||
for localAcc in localKp.accounts:
|
let addresses = localKp.accounts.map(a => a.address)
|
||||||
let accAddress = localAcc.address
|
for address in addresses:
|
||||||
|
let accAddress = address
|
||||||
if keypair.accounts.filter(a => cmpIgnoreCase(a.address, accAddress) == 0).len == 0:
|
if keypair.accounts.filter(a => cmpIgnoreCase(a.address, accAddress) == 0).len == 0:
|
||||||
self.handleWalletAccount(WalletAccountDto(address: accAddress, removed: true), notify = false)
|
self.handleWalletAccount(WalletAccountDto(address: accAddress, removed: true), notify = false)
|
||||||
# - second add/update new/existing accounts
|
# - second add/update new/existing accounts
|
||||||
|
Loading…
x
Reference in New Issue
Block a user