Updated on 2026-08-14

This commit is contained in:
Tangem 2021-05-21 10:25:17 +03:00
parent aaa394bae5
commit 33759c620c

View file

@ -199,8 +199,17 @@ class TapWalletManager {
store.dispatch(WalletAction.MultiWallet.FindBlockchainsInUse(card, walletManagerFactory))
store.dispatch(WalletAction.MultiWallet.FindTokensInUse)
} else {
val blockchains = savedCurrencies.blockchains
val walletManagers = walletManagerFactory.makeWalletManagersForApp(card, blockchains)
val blockchains = savedCurrencies.blockchains
val walletManagers = if (
presetTokens.isNotEmpty() &&
primaryWalletManager != null && primaryBlockchain != null
) {
val blockchainsWithoutPrimary = blockchains.filterNot { it == primaryBlockchain }
walletManagerFactory.makeWalletManagersForApp(card, blockchainsWithoutPrimary)
.plus(primaryWalletManager)
} else {
walletManagerFactory.makeWalletManagersForApp(card, blockchains)
}
store.dispatch(WalletAction.MultiWallet.AddWalletManagers(walletManagers))
store.dispatch(WalletAction.MultiWallet.AddBlockchains(blockchains))