Updated on 2026-08-14

This commit is contained in:
Tangem 2023-02-13 14:41:12 +03:00
parent fd1f70b526
commit 0ba653bfbd
3 changed files with 6 additions and 3 deletions

View file

@ -112,7 +112,6 @@ private fun WalletDataModel.mapToReduxModel(
amountFormatted = amountFormatted, amountFormatted = amountFormatted,
fiatAmount = fiatAmount, fiatAmount = fiatAmount,
fiatAmountFormatted = fiatAmountFormatted, fiatAmountFormatted = fiatAmountFormatted,
// token = null,
amountToCreateAccount = (status as? WalletDataModel.NoAccount) amountToCreateAccount = (status as? WalletDataModel.NoAccount)
?.amountToCreateAccount ?.amountToCreateAccount
?.toString(), ?.toString(),

View file

@ -315,7 +315,11 @@ class WalletMiddleware {
scope.launch(Dispatchers.Default) { scope.launch(Dispatchers.Default) {
val reduxWalletStores = walletsStores.mapToReduxModels() val reduxWalletStores = walletsStores.mapToReduxModels()
if (!state.isMultiwalletAllowed) { if (!state.isMultiwalletAllowed) {
findSelectedCurrency(reduxWalletStores, null, false)?.let { findSelectedCurrency(
walletsStores = reduxWalletStores,
currentSelectedCurrency = null,
isMultiWalletAllowed = false,
)?.let {
store.dispatchOnMain(WalletAction.MultiWallet.SetSingleWalletCurrency(it)) store.dispatchOnMain(WalletAction.MultiWallet.SetSingleWalletCurrency(it))
} }
} }

View file

@ -59,7 +59,7 @@ class MultiWalletReducer {
WalletStore( WalletStore(
walletManager = walletManager, walletManager = walletManager,
blockchainNetwork = blockchain, blockchainNetwork = blockchain,
walletsData = listOfNotNull(walletData), walletsData = listOf(walletData),
) )
} }