From e6968d7b35ed894f9ec12cedd2084f97b85378c7 Mon Sep 17 00:00:00 2001 From: Tangem Date: Tue, 7 Jul 2026 12:39:42 +0200 Subject: [PATCH] Updated on 2026-08-14 --- .../tangem/tap/routing/utils/ChildFactory.kt | 5 +++-- .../com/tangem/common/routing/AppRoute.kt | 1 + .../DefaultMarketsTokenDetailsComponent.kt | 2 +- .../market/details/MarketsTokenDetailsModel.kt | 1 + .../tokendetails/TokenDetailsComponent.kt | 1 + .../DefaultTokenDetailsComponent.kt | 18 ++++++++++-------- 6 files changed, 17 insertions(+), 11 deletions(-) diff --git a/app/src/main/java/com/tangem/tap/routing/utils/ChildFactory.kt b/app/src/main/java/com/tangem/tap/routing/utils/ChildFactory.kt index c43ead18f2..f7c46d1d64 100644 --- a/app/src/main/java/com/tangem/tap/routing/utils/ChildFactory.kt +++ b/app/src/main/java/com/tangem/tap/routing/utils/ChildFactory.kt @@ -21,7 +21,6 @@ import com.tangem.features.feed.entry.components.FeedEntryRoute import com.tangem.features.home.api.HomeComponent import com.tangem.features.hotwallet.* import com.tangem.features.kyc.KycComponent -import com.tangem.features.survey.SurveyComponent import com.tangem.features.managetokens.component.ChooseManagedTokensComponent import com.tangem.features.managetokens.component.ManageTokensComponent import com.tangem.features.managetokens.component.ManageTokensMode @@ -37,9 +36,10 @@ import com.tangem.features.send.api.NFTSendComponent import com.tangem.features.send.api.SendComponent import com.tangem.features.send.api.SendEntryPointComponent import com.tangem.features.staking.api.StakingComponent +import com.tangem.features.survey.SurveyComponent import com.tangem.features.swap.SwapComponent -import com.tangem.features.tangempay.components.TangemPayHotWalletOnboardingComponent import com.tangem.features.tangempay.components.TangemPayDetailsContainerComponent +import com.tangem.features.tangempay.components.TangemPayHotWalletOnboardingComponent import com.tangem.features.tangempay.components.TangemPayOnboardingComponent import com.tangem.features.tangempay.components.TangemPayOnboardingComponent.Params.* import com.tangem.features.tokendetails.TokenDetailsComponent @@ -307,6 +307,7 @@ internal class ChildFactory @Inject constructor( userWalletId = route.userWalletId, currency = route.currency, navigationAction = route.navigationAction, + shouldShowMarketBlock = route.shouldShowMarketBlock, ), componentFactory = tokenDetailsComponentFactory, ) 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 3b46824c4d..cd1e1253a0 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 @@ -64,6 +64,7 @@ sealed class AppRoute(val path: String) : Route { val userWalletId: UserWalletId, val currency: CryptoCurrency, val navigationAction: NavigationAction? = null, + val shouldShowMarketBlock: Boolean = true, ) : AppRoute(path = "/currency_details/${userWalletId.stringValue}/${currency.id.value}") @Serializable diff --git a/features/feed/impl/src/main/kotlin/com/tangem/features/feed/components/market/details/DefaultMarketsTokenDetailsComponent.kt b/features/feed/impl/src/main/kotlin/com/tangem/features/feed/components/market/details/DefaultMarketsTokenDetailsComponent.kt index a185cc8ed4..efbc99093b 100644 --- a/features/feed/impl/src/main/kotlin/com/tangem/features/feed/components/market/details/DefaultMarketsTokenDetailsComponent.kt +++ b/features/feed/impl/src/main/kotlin/com/tangem/features/feed/components/market/details/DefaultMarketsTokenDetailsComponent.kt @@ -76,7 +76,7 @@ internal class DefaultMarketsTokenDetailsComponent( } private val portfolioBlockComponent: PortfolioBlockComponent? = - if (designFeatureToggles.isRedesignEnabled) { + if (updatedParams.shouldShowPortfolio && designFeatureToggles.isRedesignEnabled) { portfolioBlockComponentFactory.create( context = child("portfolio_block"), params = PortfolioBlockComponent.Params(token = updatedParams.token), diff --git a/features/feed/impl/src/main/kotlin/com/tangem/features/feed/model/market/details/MarketsTokenDetailsModel.kt b/features/feed/impl/src/main/kotlin/com/tangem/features/feed/model/market/details/MarketsTokenDetailsModel.kt index a87365998c..d5976c19fa 100644 --- a/features/feed/impl/src/main/kotlin/com/tangem/features/feed/model/market/details/MarketsTokenDetailsModel.kt +++ b/features/feed/impl/src/main/kotlin/com/tangem/features/feed/model/market/details/MarketsTokenDetailsModel.kt @@ -401,6 +401,7 @@ internal class MarketsTokenDetailsModel @Inject constructor( AppRoute.CurrencyDetails( userWalletId = result.wallet.walletId, currency = result.addedCurrency.currency, + shouldShowMarketBlock = false, ), ) } diff --git a/features/tokendetails/api/src/main/kotlin/com/tangem/features/tokendetails/TokenDetailsComponent.kt b/features/tokendetails/api/src/main/kotlin/com/tangem/features/tokendetails/TokenDetailsComponent.kt index 8192a29732..05acec665c 100644 --- a/features/tokendetails/api/src/main/kotlin/com/tangem/features/tokendetails/TokenDetailsComponent.kt +++ b/features/tokendetails/api/src/main/kotlin/com/tangem/features/tokendetails/TokenDetailsComponent.kt @@ -12,6 +12,7 @@ interface TokenDetailsComponent : ComposableContentComponent { val userWalletId: UserWalletId, val currency: CryptoCurrency, val navigationAction: NavigationAction? = null, + val shouldShowMarketBlock: Boolean = true, ) interface Factory : ComponentFactory diff --git a/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/DefaultTokenDetailsComponent.kt b/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/DefaultTokenDetailsComponent.kt index aec7dd1d42..2fdff86eb3 100644 --- a/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/DefaultTokenDetailsComponent.kt +++ b/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/DefaultTokenDetailsComponent.kt @@ -22,12 +22,12 @@ import com.tangem.feature.tokendetails.presentation.tokendetails.route.TokenDeta import com.tangem.feature.tokendetails.presentation.tokendetails.ui.TokenDetailsScreen import com.tangem.feature.tokendetails.presentation.tokendetails.ui.TokenDetailsScreenLegacy import com.tangem.feature.tokendetails.presentation.tokendetails.ui.bottomsheet.ChooseAddressBottomSheetComponent -import com.tangem.features.commonfeatures.api.managefunds.ManageFundsComponent import com.tangem.feature.tokendetails.presentation.tokendetails.ui.bottomsheet.CloreMigrationBottomSheetComponent import com.tangem.feature.tokendetails.presentation.tokendetails.ui.bottomsheet.DynamicAddressesBottomSheetComponent import com.tangem.feature.tokendetails.presentation.tokendetails.ui.bottomsheet.TransferBottomSheetComponent -import com.tangem.features.rating.RatingComponent +import com.tangem.features.commonfeatures.api.managefunds.ManageFundsComponent import com.tangem.features.markets.token.block.TokenMarketBlockComponent +import com.tangem.features.rating.RatingComponent import com.tangem.features.tokendetails.ExpressTransactionsComponent import com.tangem.features.tokendetails.TokenDetailsComponent import com.tangem.features.tokenreceive.TokenReceiveComponent @@ -88,12 +88,14 @@ internal class DefaultTokenDetailsComponent @AssistedInject constructor( }, ) - private val tokenMarketBlockComponent = params.currency.toTokenMarketParam()?.let { tokenMarketParams -> - tokenMarketBlockComponentFactory.create( - appComponentContext = child("tokenMarketBlockComponent"), - params = tokenMarketParams, - ) - } + private val tokenMarketBlockComponent = params.currency.toTokenMarketParam() + ?.takeIf { params.shouldShowMarketBlock } + ?.let { tokenMarketParams -> + tokenMarketBlockComponentFactory.create( + appComponentContext = child("tokenMarketBlockComponent"), + params = tokenMarketParams, + ) + } private val yieldSupplyComponent = yieldSupplyComponentFactory.create( context = child("tokenYieldSupplyComponent"),