Updated on 2026-08-14
This commit is contained in:
parent
6afae8e619
commit
63125dc0f3
7 changed files with 54 additions and 23 deletions
|
|
@ -119,6 +119,11 @@ internal class YieldSupplyApproveModel @Inject constructor(
|
|||
val yieldSupplyFeeUM = uiState.value.yieldSupplyFeeUM as? YieldSupplyFeeUM.Content ?: return
|
||||
uiState.update(YieldSupplyTransactionInProgressTransformer)
|
||||
|
||||
analyticsEventHandler.send(YieldSupplyAnalytics.ButtonGiveApprove(
|
||||
token = cryptoCurrency.symbol,
|
||||
blockchain = cryptoCurrency.network.name,
|
||||
))
|
||||
|
||||
modelScope.launch(dispatchers.default) {
|
||||
sendTransactionUseCase(
|
||||
txData = yieldSupplyFeeUM.transactionDataList.first(),
|
||||
|
|
|
|||
|
|
@ -97,6 +97,13 @@ internal class YieldSupplyStopEarningModel @Inject constructor(
|
|||
)
|
||||
|
||||
init {
|
||||
val currency = params.cryptoCurrencyStatusFlow.value.currency
|
||||
analytics.send(
|
||||
YieldSupplyAnalytics.StopEarningScreen(
|
||||
token = currency.symbol,
|
||||
blockchain = currency.network.name,
|
||||
),
|
||||
)
|
||||
modelScope.launch {
|
||||
appCurrency = getSelectedAppCurrencyUseCase.invokeSync().getOrElse { AppCurrency.Default }
|
||||
subscribeOnCurrencyStatusUpdates()
|
||||
|
|
@ -133,6 +140,10 @@ internal class YieldSupplyStopEarningModel @Inject constructor(
|
|||
ifLeft = { error ->
|
||||
Timber.e(error.toString())
|
||||
uiState.update(YieldSupplyTransactionReadyTransformer)
|
||||
analytics.send(YieldSupplyAnalytics.EarnErrors(
|
||||
action = YieldSupplyAnalytics.Action.Stop,
|
||||
errorDescription = error.getAnalyticsDescription(),
|
||||
))
|
||||
yieldSupplyAlertFactory.getSendTransactionErrorState(
|
||||
error = error,
|
||||
popBack = params.callback::onBackClick,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue