Updated on 2026-08-14
This commit is contained in:
parent
fdd8c3a840
commit
241a53972b
3 changed files with 4 additions and 5 deletions
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue