fix(@desktop/wallet): index out of range when deleting wallet account issue fixed

This commit is contained in:
Sale Djenic 2023-05-08 09:19:37 +02:00 committed by saledjenic
parent d830624d85
commit 8ffd1194ef
1 changed files with 3 additions and 1 deletions

View File

@ -38,7 +38,9 @@ proc removeAddress*(self: Filter, address: string) =
self.addresses = @[accounts[0].address]
return
self.addresses.delete(self.addresses.find(address))
let ind = self.addresses.find(address)
if ind > -1:
self.addresses.delete(ind)
proc updateNetworks*(self: Filter) =
self.chainIds = self.controller.getEnabledChainIds()