Updated on 2026-08-14

This commit is contained in:
Tangem 2026-02-03 15:31:18 +04:00
parent df39e1703c
commit 343cf1ed20
10 changed files with 38 additions and 7 deletions

View file

@ -11,6 +11,7 @@ import com.tangem.core.decompose.model.ParamsContainer
import com.tangem.core.ui.components.currency.icon.converter.CryptoCurrencyToIconStateConverter
import com.tangem.core.ui.extensions.resourceReference
import com.tangem.core.ui.extensions.wrappedList
import com.tangem.datasource.local.appsflyer.AppsFlyerStore
import com.tangem.domain.appcurrency.GetSelectedAppCurrencyUseCase
import com.tangem.domain.appcurrency.model.AppCurrency
import com.tangem.domain.models.currency.CryptoCurrencyStatus
@ -65,6 +66,7 @@ internal class YieldSupplyStartEarningModel @Inject constructor(
private val yieldSupplyGetMaxFeeUseCase: YieldSupplyGetMaxFeeUseCase,
private val yieldSupplyGetCurrentFeeUseCase: YieldSupplyGetCurrentFeeUseCase,
private val yieldSupplyRepository: YieldSupplyRepository,
private val appsFlyerStore: AppsFlyerStore,
) : Model(), YieldSupplyNotificationsComponent.ModelCallback {
private val params: YieldSupplyStartEarningComponent.Params = paramsContainer.require()
@ -267,6 +269,7 @@ internal class YieldSupplyStartEarningModel @Inject constructor(
YieldSupplyAnalytics.FundsEarned(
blockchain = cryptoCurrency.network.name,
token = cryptoCurrency.symbol,
referralId = appsFlyerStore.get()?.refcode,
),
)
yieldSupplyFeeUM.transactionDataList.forEach {

View file

@ -11,6 +11,7 @@ import com.tangem.core.navigation.url.UrlOpener
import com.tangem.core.ui.components.currency.icon.converter.CryptoCurrencyToIconStateConverter
import com.tangem.core.ui.extensions.resourceReference
import com.tangem.core.ui.extensions.wrappedList
import com.tangem.datasource.local.appsflyer.AppsFlyerStore
import com.tangem.domain.appcurrency.GetSelectedAppCurrencyUseCase
import com.tangem.domain.appcurrency.model.AppCurrency
import com.tangem.domain.models.currency.CryptoCurrency
@ -61,6 +62,7 @@ internal class YieldSupplyStopEarningModel @Inject constructor(
private val yieldSupplyAlertFactory: YieldSupplyAlertFactory,
private val yieldSupplyDeactivateUseCase: YieldSupplyDeactivateUseCase,
private val yieldSupplyRepository: YieldSupplyRepository,
private val appsFlyerStore: AppsFlyerStore,
) : Model(), YieldSupplyNotificationsComponent.ModelCallback {
private val params: YieldSupplyStopEarningComponent.Params = paramsContainer.require()
@ -160,7 +162,7 @@ internal class YieldSupplyStopEarningModel @Inject constructor(
yieldSupplyAlertFactory.onFailedTxEmailClick(
userWallet = params.userWallet,
cryptoCurrency = cryptoCurrency,
errorMessage = error.toString(),
errorMessage = errorMessage,
)
}
},
@ -184,6 +186,7 @@ internal class YieldSupplyStopEarningModel @Inject constructor(
YieldSupplyAnalytics.FundsWithdrawn(
token = cryptoCurrency.symbol,
blockchain = cryptoCurrency.network.name,
referralId = appsFlyerStore.get()?.refcode,
),
)
val event = AnalyticsParam.TxSentFrom.Earning(