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

@ -84,11 +84,12 @@ class GetCurrencyWarningsUseCase(
): Flow<CryptoCurrencyWarning?> {
val currency = currencyStatus.currency
val cryptoStatuses = operations.getCurrenciesStatusesSync()
val promoBanner = promoRepository.getChangellyPromoBanner()
return combine(
showSwapPromoTokenUseCase().conflate(),
flowOf(marketCryptoCurrencyRepository.isExchangeable(userWalletId, currency)).conflate(),
) { shouldShowSwapPromo, isExchangeable ->
val promoBanner = promoRepository.getChangellyPromoBanner() ?: return@combine null
promoBanner ?: return@combine null
val showPromo = promoBanner.isActive && shouldShowSwapPromo
if (showPromo && isExchangeable && currencyStatus.value !is CryptoCurrencyStatus.Unreachable) {
cryptoStatuses.fold(