Updated on 2026-08-14

This commit is contained in:
Tangem 2025-04-21 17:15:38 +05:00
parent 17008240b9
commit aba620bd59
12 changed files with 21 additions and 21 deletions

View file

@ -47,13 +47,13 @@ internal class DefaultTokenDetailsRouter @Inject constructor(
)
}
override fun openOnrampSuccess(externalTxId: String) {
override fun openOnrampSuccess(txId: String) {
// finish current onramp flow and show onramp success screen
val replaceOnrampScreens = router.stack
.filterNot { it is AppRoute.Onramp }
.toMutableList()
replaceOnrampScreens.add(AppRoute.OnrampSuccess(externalTxId))
replaceOnrampScreens.add(AppRoute.OnrampSuccess(txId))
router.replaceAll(*replaceOnrampScreens.toTypedArray())
}

View file

@ -18,5 +18,5 @@ internal interface InnerTokenDetailsRouter {
fun openStaking(userWalletId: UserWalletId, cryptoCurrency: CryptoCurrency, yieldId: String)
fun openOnrampSuccess(externalTxId: String)
fun openOnrampSuccess(txId: String)
}

View file

@ -195,9 +195,9 @@ internal class TokenDetailsModel @Inject constructor(
handleBalanceHiding()
}
fun onBuyCurrencyDeepLink(externalTxId: String) {
fun onBuyCurrencyDeepLink(txId: String) {
if (onrampFeatureToggles.isFeatureEnabled) {
router.openOnrampSuccess(externalTxId)
router.openOnrampSuccess(txId)
} else {
val currency = cryptoCurrencyStatus?.currency ?: return
analyticsEventsHandler.send(TokenScreenAnalyticsEvent.Bought(currency.symbol))