Updated on 2026-08-14

This commit is contained in:
Tangem 2026-05-20 12:30:46 +04:00
parent 29f55aae33
commit 9678c49b37
17 changed files with 151 additions and 57 deletions

View file

@ -61,6 +61,7 @@ internal sealed class SendWithSwapAnalyticEvents(
val feeType: AnalyticsParam.FeeType,
val fromToken: CryptoCurrency,
val toToken: CryptoCurrency,
val feeAssetType: AnalyticsParam.FeeAssetType,
val fromDerivationIndex: Int?,
val toDerivationIndex: Int?,
) : SendWithSwapAnalyticEvents(
@ -74,6 +75,7 @@ internal sealed class SendWithSwapAnalyticEvents(
put(RECEIVE_BLOCKCHAIN, toToken.network.name)
if (fromDerivationIndex != null) put(ACCOUNT_DERIVATION_FROM, fromDerivationIndex.toString())
if (toDerivationIndex != null) put(ACCOUNT_DERIVATION_TO, toDerivationIndex.toString())
put(AnalyticsParam.Key.FEE_ASSET_TYPE, feeAssetType.value)
},
), AppsFlyerIncludedEvent

View file

@ -503,12 +503,19 @@ internal class SendWithSwapConfirmModel @Inject constructor(
.getOrNull()?.account
val toDerivationIndex = destinationAccount?.derivationIndex?.value
val feeToken = getSelectedFeeToken()
val feeAssetType = if (feeToken is CryptoCurrency.Coin) {
AnalyticsParam.FeeAssetType.Coin
} else {
AnalyticsParam.FeeAssetType.Token
}
analyticsEventHandler.send(
SendWithSwapAnalyticEvents.TransactionScreenOpened(
providerName = selectedProvider.name,
feeType = feeType,
fromToken = fromCurrency,
toToken = toCurrency,
feeAssetType = feeAssetType,
fromDerivationIndex = fromDerivationIndex,
toDerivationIndex = toDerivationIndex,
),
@ -519,7 +526,8 @@ internal class SendWithSwapConfirmModel @Inject constructor(
blockchain = fromCurrency.network.name,
token = fromCurrency.symbol,
feeType = feeType,
feeToken = getSelectedFeeToken().symbol,
feeToken = feeToken.symbol,
feeAssetType = feeAssetType,
),
memoType = Basic.TransactionSent.MemoType.Null,
),