Updated on 2026-08-14

This commit is contained in:
Tangem 2023-12-14 14:11:00 +03:00
parent 9a9c365735
commit 3ed4ba95cd
20 changed files with 78 additions and 15 deletions

View file

@ -73,6 +73,7 @@ internal class WalletSingleCurrencyLoadedBalanceConverter(
is CryptoCurrencyStatus.Custom,
is CryptoCurrencyStatus.MissedDerivation,
is CryptoCurrencyStatus.Unreachable,
is CryptoCurrencyStatus.UnreachableWithoutAddresses,
is CryptoCurrencyStatus.NoQuote,
-> MarketPriceBlockState.Error(currencySymbol)
}
@ -116,6 +117,7 @@ internal class WalletSingleCurrencyLoadedBalanceConverter(
is CryptoCurrencyStatus.MissedDerivation,
is CryptoCurrencyStatus.Custom,
is CryptoCurrencyStatus.Unreachable,
is CryptoCurrencyStatus.UnreachableWithoutAddresses,
-> {
WalletCardState.Error(
id = selectedWallet.id,

View file

@ -21,6 +21,7 @@ internal class SingleWalletCardStateConverter(
is CryptoCurrencyStatus.Custom,
is CryptoCurrencyStatus.MissedDerivation,
is CryptoCurrencyStatus.Unreachable,
is CryptoCurrencyStatus.UnreachableWithoutAddresses,
-> value.toErrorState()
is CryptoCurrencyStatus.NoQuote,
is CryptoCurrencyStatus.Loaded,

View file

@ -25,6 +25,7 @@ internal class SingleWalletMarketPriceConverter(
is CryptoCurrencyStatus.MissedDerivation,
is CryptoCurrencyStatus.NoQuote,
is CryptoCurrencyStatus.Unreachable,
is CryptoCurrencyStatus.UnreachableWithoutAddresses,
-> MarketPriceBlockState.Error(value.currencySymbol)
}
}

View file

@ -28,6 +28,7 @@ internal class TokenItemStateConverter(
-> value.mapToTokenItemState()
is CryptoCurrencyStatus.MissedDerivation -> value.mapToNoAddressTokenItemState()
is CryptoCurrencyStatus.Unreachable,
is CryptoCurrencyStatus.UnreachableWithoutAddresses,
is CryptoCurrencyStatus.NoAmount,
-> value.mapToUnreachableTokenItemState()
}

View file

@ -22,6 +22,7 @@ internal class VisaWalletCardStateConverter(
is CryptoCurrencyStatus.Custom,
is CryptoCurrencyStatus.MissedDerivation,
is CryptoCurrencyStatus.Unreachable,
is CryptoCurrencyStatus.UnreachableWithoutAddresses,
-> value.toErrorState()
is CryptoCurrencyStatus.NoQuote,
is CryptoCurrencyStatus.Loaded,

View file

@ -72,7 +72,9 @@ internal class PrimaryCurrencySubscriber(
is CryptoCurrencyStatus.NoAmount,
-> createCardBalanceState(fiatAmount)
is CryptoCurrencyStatus.NoQuote -> AnalyticsParam.CardBalanceState.NoRate
is CryptoCurrencyStatus.Unreachable -> AnalyticsParam.CardBalanceState.BlockchainError
is CryptoCurrencyStatus.Unreachable,
is CryptoCurrencyStatus.UnreachableWithoutAddresses,
-> AnalyticsParam.CardBalanceState.BlockchainError
is CryptoCurrencyStatus.MissedDerivation,
is CryptoCurrencyStatus.Loading,
is CryptoCurrencyStatus.Custom,

View file

@ -28,6 +28,7 @@ internal class CryptoCurrencyStatusToTokenItemConverter(
-> value.mapToTokenItemState()
is CryptoCurrencyStatus.MissedDerivation -> value.mapToNoAddressTokenItemState()
is CryptoCurrencyStatus.Unreachable,
is CryptoCurrencyStatus.UnreachableWithoutAddresses,
is CryptoCurrencyStatus.NoAmount,
-> value.mapToUnreachableTokenItemState()
}

View file

@ -1222,7 +1222,9 @@ internal class WalletViewModel @Inject constructor(
}
}
is CryptoCurrencyStatus.NoQuote -> AnalyticsParam.CardBalanceState.NoRate
is CryptoCurrencyStatus.Unreachable -> AnalyticsParam.CardBalanceState.BlockchainError
is CryptoCurrencyStatus.Unreachable,
is CryptoCurrencyStatus.UnreachableWithoutAddresses,
-> AnalyticsParam.CardBalanceState.BlockchainError
is CryptoCurrencyStatus.MissedDerivation,
is CryptoCurrencyStatus.Loading,
is CryptoCurrencyStatus.Custom,