Updated on 2026-08-14
This commit is contained in:
commit
77f097766d
4 changed files with 11 additions and 9 deletions
|
|
@ -165,6 +165,14 @@ internal class DefaultWalletStoresManager(
|
|||
.build(),
|
||||
)
|
||||
}
|
||||
.flatMapOnFailure { error ->
|
||||
when (error) {
|
||||
is WalletStoresError.WalletManagerNotCreated,
|
||||
is WalletStoresError.UpdateWalletManagerError,
|
||||
-> CompletionResult.Success(Unit)
|
||||
else -> CompletionResult.Failure(error)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal data class State(
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ data class UserWalletModel(
|
|||
) {
|
||||
sealed interface Type {
|
||||
data class SingleCurrency(
|
||||
val blockchainName: String?,
|
||||
val blockchainName: String,
|
||||
) : Type
|
||||
|
||||
data class MultiCurrency(
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ internal object WalletSelectorReducer {
|
|||
)
|
||||
} else {
|
||||
UserWalletModel.Type.SingleCurrency(
|
||||
blockchainName = (prevType as? UserWalletModel.Type.SingleCurrency)?.blockchainName,
|
||||
blockchainName = scanResponse.getBlockchain().fullName,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue