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:
parent
e9f4426e61
commit
5281cae198
|
@ -200,6 +200,10 @@ QtObject:
|
||||||
if(balance.balance.getAmount() >= requiredGas):
|
if(balance.balance.getAmount() >= requiredGas):
|
||||||
return true
|
return true
|
||||||
|
|
||||||
|
break
|
||||||
|
|
||||||
|
break
|
||||||
|
|
||||||
return false
|
return false
|
||||||
|
|
||||||
proc getTokenBalanceOnChain*(self: Model, chainId: int, tokenSymbol: string): CurrencyAmount =
|
proc getTokenBalanceOnChain*(self: Model, chainId: int, tokenSymbol: string): CurrencyAmount =
|
||||||
|
@ -213,6 +217,8 @@ QtObject:
|
||||||
|
|
||||||
return balance.balance
|
return balance.balance
|
||||||
|
|
||||||
|
break
|
||||||
|
|
||||||
return newCurrencyAmount(
|
return newCurrencyAmount(
|
||||||
0.0,
|
0.0,
|
||||||
tokenSymbol,
|
tokenSymbol,
|
||||||
|
|
|
@ -24,7 +24,7 @@ proc walletTokenToItem*(
|
||||||
currencyAmountToItem(t.getCurrencyBalance(enabledChainIds, currency), currencyFormat),
|
currencyAmountToItem(t.getCurrencyBalance(enabledChainIds, currency), currencyFormat),
|
||||||
t.getVisibleForNetwork(enabledChainIds),
|
t.getVisibleForNetwork(enabledChainIds),
|
||||||
t.getVisibleForNetworkWithPositiveBalance(enabledChainIds),
|
t.getVisibleForNetworkWithPositiveBalance(enabledChainIds),
|
||||||
t.getBalances(enabledChainIds).map(b => balanceToItem(b, tokenFormat)),
|
t.getBalances(chainIds).map(b => balanceToItem(b, tokenFormat)),
|
||||||
t.description,
|
t.description,
|
||||||
t.assetWebsiteUrl,
|
t.assetWebsiteUrl,
|
||||||
t.builtOn,
|
t.builtOn,
|
||||||
|
|
|
@ -15,7 +15,7 @@ StatusListItem {
|
||||||
signal tokenSelected(var selectedToken)
|
signal tokenSelected(var selectedToken)
|
||||||
|
|
||||||
title: name
|
title: name
|
||||||
label: LocaleUtils.currencyAmountToLocaleString(enabledNetworkCurrencyBalance)
|
label: LocaleUtils.currencyAmountToLocaleString(totalCurrencyBalance)
|
||||||
asset.name: symbol ? Style.png("tokens/" + symbol) : ""
|
asset.name: symbol ? Style.png("tokens/" + symbol) : ""
|
||||||
asset.isImage: true
|
asset.isImage: true
|
||||||
asset.width: 32
|
asset.width: 32
|
||||||
|
|
Loading…
Reference in New Issue