Updated on 2026-08-14

This commit is contained in:
Tangem 2024-08-14 15:24:30 +04:00
parent 5f1e59aae0
commit a6bafca10e
2 changed files with 12 additions and 5 deletions

View file

@ -21,6 +21,7 @@ dependencies {
implementation(projects.core.ui)
implementation(projects.common.routing)
implementation(projects.common.ui)
implementation(projects.core.decompose) // For Route supertype
/** Domain modules **/
implementation(projects.domain.appCurrency)

View file

@ -33,12 +33,18 @@ internal class SwapRouter(
}
fun openTokenDetails(userWalletId: UserWalletId, currency: CryptoCurrency) {
router.push(
AppRoute.CurrencyDetails(
userWalletId = userWalletId,
currency = currency,
),
val route = AppRoute.CurrencyDetails(
userWalletId = userWalletId,
currency = currency,
)
if (route in router.stack) {
router.popTo(route)
} else {
router.pop {
router.push(route)
}
}
}
}