fix(@desktop/wallet): Fix send modal to display all balances in

advanced mode, independent of network selection.
Fix missing break in for loop in token model

Fixes #8858
This commit is contained in:
Ivan Belyakov 2023-02-28 18:10:40 +03:00 committed by IvanBelyakoff
parent e9f4426e61
commit 5281cae198
3 changed files with 8 additions and 2 deletions

View File

@ -200,6 +200,10 @@ QtObject:
if(balance.balance.getAmount() >= requiredGas):
return true
break
break
return false
proc getTokenBalanceOnChain*(self: Model, chainId: int, tokenSymbol: string): CurrencyAmount =
@ -213,6 +217,8 @@ QtObject:
return balance.balance
break
return newCurrencyAmount(
0.0,
tokenSymbol,

View File

@ -24,7 +24,7 @@ proc walletTokenToItem*(
currencyAmountToItem(t.getCurrencyBalance(enabledChainIds, currency), currencyFormat),
t.getVisibleForNetwork(enabledChainIds),
t.getVisibleForNetworkWithPositiveBalance(enabledChainIds),
t.getBalances(enabledChainIds).map(b => balanceToItem(b, tokenFormat)),
t.getBalances(chainIds).map(b => balanceToItem(b, tokenFormat)),
t.description,
t.assetWebsiteUrl,
t.builtOn,

View File

@ -15,7 +15,7 @@ StatusListItem {
signal tokenSelected(var selectedToken)
title: name
label: LocaleUtils.currencyAmountToLocaleString(enabledNetworkCurrencyBalance)
label: LocaleUtils.currencyAmountToLocaleString(totalCurrencyBalance)
asset.name: symbol ? Style.png("tokens/" + symbol) : ""
asset.isImage: true
asset.width: 32