Updated on 2026-08-14

This commit is contained in:
Tangem 2022-06-07 15:16:59 +03:00
parent fdd8c3a840
commit 241a53972b
3 changed files with 4 additions and 5 deletions

View file

@ -288,7 +288,6 @@ data class WalletState(
private fun updateTotalBalance(): WalletState {
val walletsData = this.wallets
.flatMap(WalletStore::walletsData)
.filter { it.fiatRate != null }
return if (walletsData.isNotEmpty()) {
this.copy(

View file

@ -18,8 +18,9 @@ fun List<WalletData>.calculateTotalFiatAmount(): BigDecimal {
}
private fun List<WalletData>.mapToProgressState(): List<ProgressState> {
return this.map {
when (it.currencyData.status) {
return this.map { wallet ->
if (wallet.fiatRate == null) ProgressState.Error
else when (wallet.currencyData.status) {
BalanceStatus.Refreshing -> ProgressState.Refreshing
BalanceStatus.VerifiedOnline,
BalanceStatus.SameCurrencyTransactionInProgress,

View file

@ -138,8 +138,7 @@ class MultiWalletView : WalletView {
show = totalBalance.state == ProgressState.Error
)
tvBalance.text = if (totalBalance.state == ProgressState.Error) ""
else totalBalance.fiatAmount.formatAmountAsSpannedString(
tvBalance.text = totalBalance.fiatAmount.formatAmountAsSpannedString(
currencySymbol = totalBalance.fiatCurrency.symbol
)
tvCurrencyName.text = totalBalance.fiatCurrency.code