Updated on 2026-08-14

This commit is contained in:
Tangem 2025-03-03 15:30:31 +02:00
parent 193dea813e
commit ca286232ba
13 changed files with 111 additions and 92 deletions

View file

@ -5,7 +5,6 @@ import com.tangem.common.routing.AppRoute
import com.tangem.common.routing.AppRouter
import com.tangem.core.navigation.share.ShareManager
import com.tangem.core.navigation.url.UrlOpener
import com.tangem.domain.staking.model.stakekit.Yield
import com.tangem.domain.tokens.model.CryptoCurrency
import com.tangem.domain.wallets.models.UserWalletId
import com.tangem.feature.tokendetails.presentation.TokenDetailsFragment
@ -39,12 +38,12 @@ internal class DefaultTokenDetailsRouter(
)
}
override fun openStaking(userWalletId: UserWalletId, cryptoCurrency: CryptoCurrency, yield: Yield) {
override fun openStaking(userWalletId: UserWalletId, cryptoCurrency: CryptoCurrency, yieldId: String) {
router.push(
AppRoute.Staking(
userWalletId = userWalletId,
cryptoCurrencyId = cryptoCurrency.id,
yield = yield,
yieldId = yieldId,
),
)
}

View file

@ -1,6 +1,5 @@
package com.tangem.feature.tokendetails.presentation.router
import com.tangem.domain.staking.model.stakekit.Yield
import com.tangem.domain.tokens.model.CryptoCurrency
import com.tangem.domain.wallets.models.UserWalletId
import com.tangem.features.tokendetails.navigation.TokenDetailsRouter
@ -18,7 +17,7 @@ internal interface InnerTokenDetailsRouter : TokenDetailsRouter {
fun openTokenDetails(userWalletId: UserWalletId, currency: CryptoCurrency)
fun openStaking(userWalletId: UserWalletId, cryptoCurrency: CryptoCurrency, yield: Yield)
fun openStaking(userWalletId: UserWalletId, cryptoCurrency: CryptoCurrency, yieldId: String)
fun openOnrampSuccess(externalTxId: String)
}

View file

@ -994,7 +994,7 @@ internal class TokenDetailsViewModel @Inject constructor(
error("Staking is unavailable for ${cryptoCurrency.name}")
}
router.openStaking(userWalletId, cryptoCurrency, yield)
router.openStaking(userWalletId, cryptoCurrency, yield.id)
}
}