Updated on 2026-08-14

This commit is contained in:
Tangem 2025-09-02 12:17:12 +03:00
parent 17d7fb3c02
commit 2934b42af5
29 changed files with 360 additions and 49 deletions

View file

@ -38,24 +38,19 @@ internal class DefaultPromoRepository(
key = PreferencesKeys.getShouldShowPromoKey(promoId = promoId.name),
default = true,
).map { shouldShow ->
if (promoId == PromoId.Referral) {
runCatching {
when (promoId) {
PromoId.Referral -> runCatching {
!referralRepository.isReferralParticipant(userWalletId) && shouldShow
}.getOrDefault(false)
} else {
shouldShow
PromoId.Sepa -> shouldShow
}
}
}
override fun isReadyToShowTokenPromo(promoId: PromoId): Flow<Boolean> {
return if (promoId == PromoId.Referral) {
flowOf(false)
} else {
appPreferencesStore.get(
PreferencesKeys.getShouldShowPromoKey(promoId = promoId.name),
default = false,
)
return when (promoId) {
PromoId.Referral -> flowOf(false)
PromoId.Sepa -> flowOf(false)
}
}