Updated on 2026-08-14
This commit is contained in:
commit
06144d02bb
6 changed files with 9 additions and 9 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
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@
|
|||
app:veilLayout_veiled="true"
|
||||
app:veilLayout_radius="4dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_title"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/tv_processing"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
tools:veilLayout_veiled="false">
|
||||
|
|
@ -80,7 +80,8 @@
|
|||
android:textSize="12sp"
|
||||
android:text="@string/main_processing_full_amount"
|
||||
app:layout_constraintTop_toBottomOf="@id/veil_balance"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_currency_name"
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@
|
|||
<string name="common_custom">Пользовательский</string>
|
||||
|
||||
<string name="main_page_balance">Баланс</string>
|
||||
<string name="main_processing_full_amount">Некоторые сети недоступны</string>
|
||||
<string name="main_processing_full_amount">В сумме учтены не все монеты</string>
|
||||
<string name="main_manage_tokens">Управление токенами</string>
|
||||
<string name="token_item_no_rate">Нет цены</string>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@
|
|||
<string name="common_custom">Custom</string>
|
||||
|
||||
<string name="main_page_balance">Total balance</string>
|
||||
<string name="main_processing_full_amount">Some networks are unreachable</string>
|
||||
<string name="main_processing_full_amount">The amount does not include some of your funds</string>
|
||||
<string name="main_manage_tokens">Manage tokens</string>
|
||||
<string name="token_item_no_rate">No rate</string>
|
||||
</resources>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue