Updated on 2026-08-14

This commit is contained in:
Tangem 2024-02-08 22:00:38 +03:00
parent 7e4dc3dbb4
commit 8f7f7c85ca
2 changed files with 6 additions and 8 deletions

View file

@ -22,10 +22,7 @@ import dagger.hilt.android.scopes.ViewModelScoped
import kotlinx.collections.immutable.ImmutableList
import kotlinx.collections.immutable.persistentListOf
import kotlinx.collections.immutable.toImmutableList
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.combine
import kotlinx.coroutines.flow.conflate
import kotlinx.coroutines.flow.flowOf
import kotlinx.coroutines.flow.*
import timber.log.Timber
import javax.inject.Inject
@ -54,14 +51,14 @@ internal class GetMultiWalletWarningsFactory @Inject constructor(
val cardTypesResolver = userWallet.scanResponse.cardTypesResolver
val promoFlow = flow { emit(promoRepository.getChangellyPromoBanner()) }
return combine(
flow = getTokenListUseCase(userWallet.walletId).conflate(),
flow2 = isReadyToShowRateAppUseCase().conflate(),
flow3 = isNeedToBackupUseCase(userWallet.walletId).conflate(),
flow4 = shouldShowSwapPromoWalletUseCase().conflate(),
) { maybeTokenList, isReadyToShowRating, isNeedToBackup, shouldShowPromo ->
val promoBanner = promoRepository.getChangellyPromoBanner()
flow5 = promoFlow,
) { maybeTokenList, isReadyToShowRating, isNeedToBackup, shouldShowPromo, promoBanner ->
readyForRateAppNotification = true
buildList {