Updated on 2026-08-14

This commit is contained in:
Tangem 2023-03-03 18:50:00 +03:00
parent 9e1ceea2dc
commit c50c2a668b
6 changed files with 31 additions and 4 deletions

View file

@ -70,7 +70,15 @@ sealed class AnalyticsParam {
object MyWallets : ScannedFrom("My Wallets")
}
sealed class TxSentFrom(val value: String) {
object Send : TxSentFrom("Send")
object Swap : TxSentFrom("Swap")
object WalletConnect : TxSentFrom("WalletConnect")
object Sell : TxSentFrom("Sell")
}
companion object Key {
const val Source = "Source"
const val Batch = "Batch"
const val ProductType = "Product Type"
const val Firmware = "Firmware"

View file

@ -16,7 +16,7 @@ sealed class Basic(
) : Basic(
event = "Card Was Scanned",
params = mapOf(
"Source" to source.value,
AnalyticsParam.Source to source.value,
),
)
@ -38,6 +38,11 @@ sealed class Basic(
params = mapOf(AnalyticsParam.Currency to currency.value),
)
class TransactionSent(sentFrom: AnalyticsParam.TxSentFrom) : Basic(
event = "Transaction sent",
params = mapOf(AnalyticsParam.Source to sentFrom.value),
)
class ScanError(error: Throwable) : Basic(
event = "Scan",
error = error,