mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-11 06:47:01 +00:00
fix(tokenService): ensure token address map is properly initialized
Nim didn't complain, but the data was being "swallowed" resulting in a broken asset list in the permissions view.
This commit is contained in:
parent
7e9e3ee252
commit
858b53979a
@ -126,7 +126,9 @@ QtObject:
|
|||||||
for token in default_tokens:
|
for token in default_tokens:
|
||||||
if not self.tokensToAddressesMap.hasKey(token.symbol):
|
if not self.tokensToAddressesMap.hasKey(token.symbol):
|
||||||
self.tokenList.add(token)
|
self.tokenList.add(token)
|
||||||
self.tokensToAddressesMap[token.symbol].addresses = initTable[int, string]()
|
self.tokensToAddressesMap[token.symbol] = TokenData(
|
||||||
|
addresses: initTable[int, string](),
|
||||||
|
)
|
||||||
|
|
||||||
if not self.tokensToAddressesMap[token.symbol].addresses.hasKey(token.chainId):
|
if not self.tokensToAddressesMap[token.symbol].addresses.hasKey(token.chainId):
|
||||||
self.tokensToAddressesMap[token.symbol].addresses[token.chainId] = $token.address
|
self.tokensToAddressesMap[token.symbol].addresses[token.chainId] = $token.address
|
||||||
|
Loading…
x
Reference in New Issue
Block a user