mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-23 20:18:47 +00:00
parent
d7d58b4933
commit
f58bfb97eb
@ -686,7 +686,7 @@ QtObject:
|
|||||||
proc getTokenBalanceOnChain*(self: Service, address: string, chainId: int, symbol: string): float64 =
|
proc getTokenBalanceOnChain*(self: Service, address: string, chainId: int, symbol: string): float64 =
|
||||||
let account = self.getAccountByAddress(address)
|
let account = self.getAccountByAddress(address)
|
||||||
for token in account.tokens:
|
for token in account.tokens:
|
||||||
if token.symbol == symbol:
|
if token.symbol == symbol and token.balancesPerChain.hasKey(chainId):
|
||||||
return token.balancesPerChain[chainId].balance
|
return token.balancesPerChain[chainId].balance
|
||||||
|
|
||||||
return 0.0
|
return 0.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user