Updated on 2026-08-14

This commit is contained in:
Tangem 2026-02-12 13:01:17 +05:00
parent 207dbeed3c
commit 0ae9e75e90
16 changed files with 55 additions and 60 deletions

View file

@ -37,9 +37,9 @@ internal class CryptoPortfolioConverter @AssistedInject constructor(
tokens = tokens,
userWallet = userWallet,
accountIndex = value.derivationIndex.toDerivationIndex(),
).toSet()
)
} else {
emptySet()
emptyList()
},
)
}

View file

@ -55,9 +55,9 @@ internal class WalletAccountListFlowFactory @Inject constructor(
val isSingleWalletWithToken = userWallet.requireColdWallet().cardTypesResolver.isSingleWalletWithToken()
val currencies = if (isSingleWalletWithToken) {
cardCryptoCurrencyFactory.createCurrenciesForSingleCurrencyCardWithToken(userWallet = userWallet).toSet()
cardCryptoCurrencyFactory.createCurrenciesForSingleCurrencyCardWithToken(userWallet = userWallet)
} else {
setOf(cardCryptoCurrencyFactory.createPrimaryCurrencyForSingleCurrencyCard(userWallet = userWallet))
listOf(cardCryptoCurrencyFactory.createPrimaryCurrencyForSingleCurrencyCard(userWallet = userWallet))
}
return AccountList.empty(userWalletId = userWallet.walletId, cryptoCurrencies = currencies)

View file

@ -119,7 +119,7 @@ class WalletAccountListFlowFactoryTest {
val actual = factory.create(userWallet.walletId).let(::getEmittedValues)
// Assert
val expected = AccountList.empty(userWalletId = userWallet.walletId, cryptoCurrencies = setOf(currency))
val expected = AccountList.empty(userWalletId = userWallet.walletId, cryptoCurrencies = listOf(currency))
Truth.assertThat(actual).containsExactly(expected)
coVerifySequence {
@ -144,7 +144,7 @@ class WalletAccountListFlowFactoryTest {
every { userWalletsListRepository.userWallets } returns userWalletsFlow
val currencies = cryptoCurrencyFactory.ethereumAndStellar.toSet()
val currencies = cryptoCurrencyFactory.ethereumAndStellar
every {
cardCryptoCurrencyFactory.createCurrenciesForSingleCurrencyCardWithToken(userWallet = nodl)
} returns currencies.toList()