Updated on 2026-08-14

This commit is contained in:
Tangem 2026-03-20 15:27:00 +03:00
parent 2a1369fce6
commit 5a99de87fb
29 changed files with 194 additions and 47 deletions

View file

@ -14,9 +14,15 @@ interface SendComponent : ComposableContentComponent {
val amount: String? = null,
val tag: String? = null,
val destinationAddress: String? = null,
val entryType: EntryType = EntryType.Manual,
val callback: ModelCallback? = null,
)
enum class EntryType {
Manual,
QR,
}
interface Factory : ComponentFactory<Params, SendComponent>
interface ModelCallback {

View file

@ -5,6 +5,7 @@ import com.tangem.core.analytics.models.AnalyticsParam.Key.BLOCKCHAIN
import com.tangem.core.analytics.models.AnalyticsParam.Key.ERROR_CODE
import com.tangem.core.analytics.models.AnalyticsParam.Key.SOURCE
import com.tangem.core.analytics.models.AnalyticsParam.Key.TOKEN_PARAM
import com.tangem.core.analytics.models.AnalyticsParam.Key.TYPE
import com.tangem.core.analytics.models.AppsFlyerIncludedEvent
/**
@ -32,11 +33,13 @@ sealed class CommonSendAnalyticEvents(
data class AmountScreenOpened(
val categoryName: String,
val source: CommonSendSource,
val type: SendEntryType = SendEntryType.Manual,
) : CommonSendAnalyticEvents(
category = categoryName,
event = "Amount Screen Opened",
params = mapOf(
SOURCE to source.analyticsName,
TYPE to type.analyticsName,
),
), AppsFlyerIncludedEvent
@ -95,6 +98,7 @@ sealed class CommonSendAnalyticEvents(
val toDerivationIndex: Int?,
val sendBlockchain: String,
val sendToken: String,
val type: SendEntryType = SendEntryType.Manual,
) : CommonSendAnalyticEvents(
category = categoryName,
event = "Confirm Screen Opened",
@ -108,6 +112,7 @@ sealed class CommonSendAnalyticEvents(
"$fromDerivationIndex, $toDerivationIndex",
)
}
put(TYPE, type.analyticsName)
},
), AppsFlyerIncludedEvent
@ -221,6 +226,11 @@ sealed class CommonSendAnalyticEvents(
Confirm,
}
enum class SendEntryType(val analyticsName: String) {
QR("QR"),
Manual("Manually"),
}
enum class CommonSendSource(val analyticsName: String) {
Send("Send"),
Swap("Swap"),