Updated on 2026-08-14

This commit is contained in:
Tangem 2022-12-13 20:34:21 +03:00
parent 05138c8897
commit de2d23d22d
3 changed files with 3 additions and 9 deletions

View file

@ -11,7 +11,7 @@ data class UserWalletModel(
) {
sealed interface Type {
data class SingleCurrency(
val blockchainName: String?,
val blockchainName: String,
) : Type
data class MultiCurrency(

View file

@ -240,13 +240,7 @@ internal class WalletSelectorMiddleware {
is UserWalletModel.Type.MultiCurrency -> type.copy(
tokensCount = walletStores.flatMap { it.walletsData }.size,
)
is UserWalletModel.Type.SingleCurrency -> type.copy(
blockchainName = walletStores
.firstOrNull()
?.blockchainNetwork
?.blockchain
?.fullName,
)
is UserWalletModel.Type.SingleCurrency -> type
},
fiatBalance = totalFiatBalanceCalculator.calculate(
prevAmount = fiatBalance.amount,

View file

@ -103,7 +103,7 @@ internal object WalletSelectorReducer {
)
} else {
UserWalletModel.Type.SingleCurrency(
blockchainName = (prevType as? UserWalletModel.Type.SingleCurrency)?.blockchainName,
blockchainName = scanResponse.getBlockchain().fullName,
)
}
}