Updated on 2026-08-14

This commit is contained in:
Tangem 2025-11-27 12:26:54 +02:00
parent a8864541bc
commit 21be815a03
12 changed files with 97 additions and 1 deletions

View file

@ -335,6 +335,11 @@ internal class WalletWarningsClickIntentsImplementor @Inject constructor(
action = PromotionBannerClicked.BannerAction.Closed,
)
PromoId.VisaPresale -> PromoAnalyticsEvent.VisaWaitlistPromoDismiss
PromoId.BlackFriday -> PromotionBannerClicked(
source = AnalyticsParam.ScreensSources.Main,
program = Program.BlackFriday,
action = PromotionBannerClicked.BannerAction.Closed,
)
},
)
@ -372,6 +377,16 @@ internal class WalletWarningsClickIntentsImplementor @Inject constructor(
analyticsEventHandler.send(PromoAnalyticsEvent.VisaWaitlistPromoJoin)
urlOpener.openUrl(VISA_PROMO_LINK)
}
PromoId.BlackFriday -> {
analyticsEventHandler.send(
PromotionBannerClicked(
source = AnalyticsParam.ScreensSources.Main,
program = Program.BlackFriday,
action = PromotionBannerClicked.BannerAction.Clicked,
),
)
urlOpener.openUrl(BLACK_FRIDAY_PROMO_LINK)
}
}
}
@ -587,5 +602,10 @@ internal class WalletWarningsClickIntentsImplementor @Inject constructor(
const val VISA_PROMO_LINK = "https://tangem.com/en/cardwaitlist/?utm_source=tangem-app-banner" +
"&utm_medium=banner" +
"&utm_campaign=tangempaywaitlist"
const val BLACK_FRIDAY_PROMO_LINK = "https://tangem.com/en/pricing/" +
"?promocode=BF2025" +
"&utm_source=tangem-app-banner" +
"&utm_medium=banner" +
"&utm_campaign=BlackFriday2025"
}
}

View file

@ -58,6 +58,10 @@ internal class WalletWarningsAnalyticsSender @Inject constructor(
source = AnalyticsParam.ScreensSources.Main,
program = Program.Sepa,
)
is WalletNotification.BlackFridayPromo -> PromoAnalyticsEvent.NoticePromotionBanner(
source = AnalyticsParam.ScreensSources.Main,
program = Program.BlackFriday,
)
is WalletNotification.ReferralPromo -> MainScreen.ReferralPromo
is WalletNotification.VisaPresalePromo -> PromoAnalyticsEvent.VisaWaitlistPromo
is WalletNotification.UnlockWallets -> null // See [SelectedWalletAnalyticsSender]

View file

@ -97,6 +97,7 @@ internal class GetMultiWalletWarningsFactory @Inject constructor(
seedPhraseNotificationUseCase(userWalletId = userWallet.walletId),
shouldShowPromoWalletUseCase(userWalletId = userWallet.walletId, promoId = PromoId.VisaPresale),
shouldShowPromoWalletUseCase(userWalletId = userWallet.walletId, promoId = PromoId.Sepa),
shouldShowPromoWalletUseCase(userWalletId = userWallet.walletId, promoId = PromoId.BlackFriday),
notificationsRepository.getShouldShowNotification(NotificationId.EnablePushesReminderNotification.key),
) { array -> array }
.combine(tokenListFlow()) { array, any: Any -> arrayOf(any).plus(elements = array) }
@ -109,7 +110,8 @@ internal class GetMultiWalletWarningsFactory @Inject constructor(
val seedPhraseIssueStatus = array[3] as SeedPhraseNotificationsStatus
val shouldShowVisaPromo = array[4] as Boolean
val shouldShowSepaBanner = array[5] as Boolean
val shouldShowEnablePushesReminderNotification = array[6] as Boolean
val shouldShowBlackFridayPromo = array[6] as Boolean
val shouldShowEnablePushesReminderNotification = array[7] as Boolean
buildList {
addUsedOutdatedDataNotification(totalFiatBalance)
@ -118,6 +120,8 @@ internal class GetMultiWalletWarningsFactory @Inject constructor(
addFinishWalletActivationNotification(userWallet, totalFiatBalance, clickIntents)
addBlackFridayPromoNotification(clickIntents, shouldShowBlackFridayPromo)
addVisaPresalePromoNotification(clickIntents, shouldShowVisaPromo)
addSepaPromoNotification(userWallet, clickIntents, shouldShowSepaBanner)
@ -286,6 +290,19 @@ internal class GetMultiWalletWarningsFactory @Inject constructor(
)
}
private fun MutableList<WalletNotification>.addBlackFridayPromoNotification(
clickIntents: WalletClickIntents,
shouldShowPromo: Boolean,
) {
addIf(
element = WalletNotification.BlackFridayPromo(
onCloseClick = { clickIntents.onClosePromoClick(promoId = PromoId.BlackFriday) },
onClick = { clickIntents.onPromoClick(promoId = PromoId.BlackFriday) },
),
condition = shouldShowPromo,
)
}
private suspend fun MutableList<WalletNotification>.addSepaPromoNotification(
userWallet: UserWallet,
clickIntents: WalletClickIntents,

View file

@ -332,6 +332,23 @@ sealed class WalletNotification(val config: NotificationConfig) {
),
)
data class BlackFridayPromo(
val onCloseClick: () -> Unit,
val onClick: () -> Unit,
) : WalletNotification(
config = NotificationConfig(
title = resourceReference(R.string.notification_black_friday_title),
subtitle = resourceReference(R.string.notification_black_friday_text),
iconResId = R.drawable.img_black_friday_promo,
onCloseClick = onCloseClick,
buttonsState = NotificationConfig.ButtonsState.SecondaryButtonConfig(
text = resourceReference(R.string.common_claim),
onClick = onClick,
),
iconSize = 54.dp,
),
)
data class PushNotifications(
val onCloseClick: () -> Unit,
val onEnabledClick: () -> Unit,

View file

@ -52,6 +52,7 @@ internal fun LazyListScope.notifications(configs: ImmutableList<WalletNotificati
is WalletNotification.UsedOutdatedData -> TangemTheme.colors.text.attention
else -> null
},
subtitleColor = TangemTheme.colors.text.secondary,
)
}
}