Updated on 2026-08-14
This commit is contained in:
parent
d90745be7d
commit
388b0547d6
4 changed files with 10 additions and 10 deletions
|
|
@ -6,7 +6,7 @@ import com.tangem.common.routing.bundle.bundle
|
|||
import com.tangem.common.routing.entity.SerializableIntent
|
||||
import com.tangem.core.decompose.navigation.Route
|
||||
import com.tangem.domain.appcurrency.model.AppCurrency
|
||||
import com.tangem.domain.markets.TokenMarketParam
|
||||
import com.tangem.domain.markets.TokenMarketParams
|
||||
import com.tangem.domain.qrscanning.models.SourceType
|
||||
import com.tangem.domain.staking.model.stakekit.Yield
|
||||
import com.tangem.domain.tokens.model.CryptoCurrency
|
||||
|
|
@ -267,7 +267,7 @@ sealed class AppRoute(val path: String) : Route {
|
|||
|
||||
@Serializable
|
||||
data class MarketsTokenDetails(
|
||||
val token: TokenMarketParam,
|
||||
val token: TokenMarketParams,
|
||||
val appCurrency: AppCurrency,
|
||||
) : AppRoute(path = "/markets_token_details/${token.id}")
|
||||
}
|
||||
|
|
@ -4,7 +4,7 @@ import com.tangem.domain.core.serialization.SerializedBigDecimal
|
|||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
data class TokenMarketParam(
|
||||
data class TokenMarketParams(
|
||||
val id: String,
|
||||
val name: String,
|
||||
val symbol: String,
|
||||
|
|
@ -21,12 +21,12 @@ data class TokenMarketParam(
|
|||
)
|
||||
}
|
||||
|
||||
fun TokenMarket.toSerializableParam(): TokenMarketParam {
|
||||
return TokenMarketParam(
|
||||
fun TokenMarket.toSerializableParam(): TokenMarketParams {
|
||||
return TokenMarketParams(
|
||||
id = id,
|
||||
name = name,
|
||||
symbol = symbol,
|
||||
tokenQuotes = TokenMarketParam.Quotes(
|
||||
tokenQuotes = TokenMarketParams.Quotes(
|
||||
currentPrice = tokenQuotesShort.currentPrice,
|
||||
h24Percent = tokenQuotesShort.h24ChangePercent,
|
||||
weekPercent = tokenQuotesShort.weekChangePercent,
|
||||
|
|
@ -8,7 +8,7 @@ import androidx.compose.ui.unit.Dp
|
|||
import com.tangem.core.decompose.factory.ComponentFactory
|
||||
import com.tangem.core.ui.decompose.ComposableContentComponent
|
||||
import com.tangem.domain.appcurrency.model.AppCurrency
|
||||
import com.tangem.domain.markets.TokenMarketParam
|
||||
import com.tangem.domain.markets.TokenMarketParams
|
||||
import com.tangem.features.markets.entry.BottomSheetState
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
|
|
@ -17,7 +17,7 @@ interface MarketsTokenDetailsComponent : ComposableContentComponent {
|
|||
|
||||
@Serializable
|
||||
data class Params(
|
||||
val token: TokenMarketParam,
|
||||
val token: TokenMarketParams,
|
||||
val appCurrency: AppCurrency,
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -118,12 +118,12 @@ internal class TokenMarketBlockModel @Inject constructor(
|
|||
private fun navigateToMarketDetails() {
|
||||
val quotes = quotesState ?: return
|
||||
|
||||
val tokenParam = TokenMarketParam(
|
||||
val tokenParam = TokenMarketParams(
|
||||
id = params.tokenId,
|
||||
name = params.tokenSymbol,
|
||||
imageUrl = params.tokenImageUrl,
|
||||
symbol = params.tokenSymbol,
|
||||
tokenQuotes = TokenMarketParam.Quotes(
|
||||
tokenQuotes = TokenMarketParams.Quotes(
|
||||
currentPrice = quotes.currentPrice,
|
||||
h24Percent = quotes.h24Percent,
|
||||
weekPercent = null,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue