Updated on 2026-08-14

This commit is contained in:
Tangem 2026-01-30 23:28:15 +04:00
parent e7f607001b
commit df39e1703c

View file

@ -59,14 +59,15 @@ internal class DefaultPromoDeeplinkHandler @AssistedInject constructor(
init {
analyticsEventsHandler.send(PromoActivationAnalytics.PromoDeepLinkActivationStart())
saveAndBindRefcode()
val promoCode = queryParams[PROMO_CODE_KEY].orEmpty()
if (promoCode.isEmpty()) {
showAlert(InvalidPromoCode)
} else {
findSelectedWallet(promoCode)
}
saveAndBindRefcode()
}
private fun findSelectedWallet(promoCode: String) {
@ -183,14 +184,19 @@ internal class DefaultPromoDeeplinkHandler @AssistedInject constructor(
message = message,
dismissOnFirstAction = true,
firstActionBuilder = {
okAction { }
okAction {
uiMessageSender.send(GlobalLoadingMessage(false))
}
},
),
)
}
@Suppress("NullableToStringCall")
private fun saveAndBindRefcode() {
scope.launch(dispatchers.default) {
Timber.i("saveAndBindRefcode: refcode = $refcode, campaign = $campaign")
if (!refcode.isNullOrBlank()) {
val conversionData = AppsFlyerConversionData(refcode = refcode, campaign = campaign)