From 388b0547d662b9cbc66d2512da8d36397c5263f9 Mon Sep 17 00:00:00 2001 From: Tangem Date: Thu, 22 Aug 2024 22:52:16 +0300 Subject: [PATCH] Updated on 2026-08-14 --- .../src/main/kotlin/com/tangem/common/routing/AppRoute.kt | 4 ++-- .../markets/{TokenMarketParam.kt => TokenMarketParams.kt} | 8 ++++---- .../markets/details/MarketsTokenDetailsComponent.kt | 4 ++-- .../token/block/impl/model/TokenMarketBlockModel.kt | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) rename domain/markets/models/src/main/kotlin/com/tangem/domain/markets/{TokenMarketParam.kt => TokenMarketParams.kt} (84%) diff --git a/common/routing/src/main/kotlin/com/tangem/common/routing/AppRoute.kt b/common/routing/src/main/kotlin/com/tangem/common/routing/AppRoute.kt index 4093b6c8a0..bae031de6d 100644 --- a/common/routing/src/main/kotlin/com/tangem/common/routing/AppRoute.kt +++ b/common/routing/src/main/kotlin/com/tangem/common/routing/AppRoute.kt @@ -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}") } \ No newline at end of file diff --git a/domain/markets/models/src/main/kotlin/com/tangem/domain/markets/TokenMarketParam.kt b/domain/markets/models/src/main/kotlin/com/tangem/domain/markets/TokenMarketParams.kt similarity index 84% rename from domain/markets/models/src/main/kotlin/com/tangem/domain/markets/TokenMarketParam.kt rename to domain/markets/models/src/main/kotlin/com/tangem/domain/markets/TokenMarketParams.kt index 6c9bd92066..643846c466 100644 --- a/domain/markets/models/src/main/kotlin/com/tangem/domain/markets/TokenMarketParam.kt +++ b/domain/markets/models/src/main/kotlin/com/tangem/domain/markets/TokenMarketParams.kt @@ -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, diff --git a/features/markets/api/src/main/kotlin/com/tangem/features/markets/details/MarketsTokenDetailsComponent.kt b/features/markets/api/src/main/kotlin/com/tangem/features/markets/details/MarketsTokenDetailsComponent.kt index 4698b42133..b7c38d44bb 100644 --- a/features/markets/api/src/main/kotlin/com/tangem/features/markets/details/MarketsTokenDetailsComponent.kt +++ b/features/markets/api/src/main/kotlin/com/tangem/features/markets/details/MarketsTokenDetailsComponent.kt @@ -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, ) diff --git a/features/markets/impl/src/main/kotlin/com/tangem/features/markets/token/block/impl/model/TokenMarketBlockModel.kt b/features/markets/impl/src/main/kotlin/com/tangem/features/markets/token/block/impl/model/TokenMarketBlockModel.kt index dccc252f97..42184de78e 100644 --- a/features/markets/impl/src/main/kotlin/com/tangem/features/markets/token/block/impl/model/TokenMarketBlockModel.kt +++ b/features/markets/impl/src/main/kotlin/com/tangem/features/markets/token/block/impl/model/TokenMarketBlockModel.kt @@ -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,