Updated on 2026-08-14

This commit is contained in:
Tangem 2025-12-15 14:59:31 +07:00
parent b316ef4d87
commit 370690a359
42 changed files with 486 additions and 35 deletions

View file

@ -62,6 +62,7 @@ sealed class SwapEvents(
class ButtonSwipeClicked : SwapEvents(event = "Button - Swipe")
@Suppress("NullableToStringCall")
data class SwapInProgressScreen(
val provider: SwapProvider,
val commission: FeeType, // Market / Fast
@ -69,6 +70,8 @@ sealed class SwapEvents(
val receiveBlockchain: String,
val sendToken: String,
val receiveToken: String,
val fromDerivationIndex: Int?,
val toDerivationIndex: Int?,
) : SwapEvents(
event = "Swap in Progress Screen Opened",
params = mapOf(
@ -78,6 +81,7 @@ sealed class SwapEvents(
"Receive Token" to receiveToken,
"Send Blockchain" to sendBlockchain,
"Receive Blockchain" to receiveBlockchain,
"Account Derivation From or To (optional)" to "$fromDerivationIndex, $toDerivationIndex",
),
)

View file

@ -847,6 +847,8 @@ internal class SwapModel @Inject constructor(
val fee = dataState.selectedFee?.feeType ?: return
val fromCurrency = dataState.fromCryptoCurrency?.currency ?: return
val toCurrency = dataState.toCryptoCurrency?.currency ?: return
val fromDerivationIndex = dataState.fromAccount?.derivationIndex?.value
val toDerivationIndex = dataState.toAccount?.derivationIndex?.value
analyticsEventHandler.send(
SwapEvents.SwapInProgressScreen(
@ -856,6 +858,8 @@ internal class SwapModel @Inject constructor(
receiveBlockchain = toCurrency.network.name,
sendToken = fromCurrency.symbol,
receiveToken = toCurrency.symbol,
fromDerivationIndex = fromDerivationIndex,
toDerivationIndex = toDerivationIndex,
),
)
}