Updated on 2026-08-14
This commit is contained in:
parent
7e4dc3dbb4
commit
8f7f7c85ca
2 changed files with 6 additions and 8 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue