Updated on 2026-08-14
This commit is contained in:
parent
f1797da7ed
commit
03d40e8a3d
19 changed files with 48 additions and 45 deletions
|
|
@ -49,7 +49,7 @@ internal class DefaultTokenDetailsRouter(
|
|||
)
|
||||
}
|
||||
|
||||
override fun openOnrampSuccess(txId: String) {
|
||||
router.push(AppRoute.OnrampSuccess(txId))
|
||||
override fun openOnrampSuccess(externalTxId: String) {
|
||||
router.push(AppRoute.OnrampSuccess(externalTxId))
|
||||
}
|
||||
}
|
||||
|
|
@ -20,5 +20,5 @@ internal interface InnerTokenDetailsRouter : TokenDetailsRouter {
|
|||
|
||||
fun openStaking(userWalletId: UserWalletId, cryptoCurrency: CryptoCurrency, yield: Yield)
|
||||
|
||||
fun openOnrampSuccess(txId: String)
|
||||
fun openOnrampSuccess(externalTxId: String)
|
||||
}
|
||||
|
|
@ -74,7 +74,7 @@ internal class OnrampStatusFactory @AssistedInject constructor(
|
|||
val selectedTx = bottomSheetConfig.value as? ExpressTransactionStateUM.OnrampUM ?: return
|
||||
|
||||
if (selectedTx.activeStatus.isTerminal) {
|
||||
onrampRemoveTransactionUseCase(txId = selectedTx.info.txId)
|
||||
onrampRemoveTransactionUseCase(externalTxId = selectedTx.info.txExternalId)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -97,14 +97,14 @@ internal class OnrampStatusFactory @AssistedInject constructor(
|
|||
|
||||
private suspend fun List<ExpressTransactionStateUM.OnrampUM>.clearHiddenTerminal() {
|
||||
this.filter { it.activeStatus.isHidden && it.activeStatus.isTerminal }
|
||||
.forEach { onrampRemoveTransactionUseCase(txId = it.info.txId) }
|
||||
.forEach { onrampRemoveTransactionUseCase(externalTxId = it.info.txExternalId) }
|
||||
}
|
||||
|
||||
private suspend fun sendStatusUpdateAnalytics(
|
||||
onrampTx: ExpressTransactionStateUM.OnrampUM,
|
||||
statusModel: OnrampStatus,
|
||||
) {
|
||||
val txId = statusModel.txId
|
||||
val externalTxId = statusModel.externalTxId
|
||||
val status = toAnalyticStatus(statusModel.status) ?: return
|
||||
|
||||
if (statusModel.status != onrampTx.activeStatus) {
|
||||
|
|
@ -116,7 +116,7 @@ internal class OnrampStatusFactory @AssistedInject constructor(
|
|||
fiatCurrency = onrampTx.fromCurrencyCode,
|
||||
),
|
||||
)
|
||||
onrampUpdateTransactionStatusUseCase(txId, statusModel.status)
|
||||
onrampUpdateTransactionStatusUseCase(externalTxId = externalTxId, statusModel.status)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -198,9 +198,9 @@ internal class TokenDetailsViewModel @Inject constructor(
|
|||
userWallet = getUserWalletUseCase(userWalletId).getOrNull() ?: error("UserWallet not found")
|
||||
}
|
||||
|
||||
private fun onBuyCurrencyDeepLink(txId: String) {
|
||||
private fun onBuyCurrencyDeepLink(externalTxId: String) {
|
||||
if (onrampFeatureToggles.isFeatureEnabled) {
|
||||
router.openOnrampSuccess(txId)
|
||||
router.openOnrampSuccess(externalTxId)
|
||||
} else {
|
||||
val currency = cryptoCurrencyStatus?.currency ?: return
|
||||
analyticsEventsHandler.send(TokenScreenAnalyticsEvent.Bought(currency.symbol))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue