Updated on 2026-08-14

This commit is contained in:
Tangem 2026-07-07 12:39:42 +02:00
parent 177176b3ee
commit e6968d7b35
6 changed files with 17 additions and 11 deletions

View file

@ -21,7 +21,6 @@ import com.tangem.features.feed.entry.components.FeedEntryRoute
import com.tangem.features.home.api.HomeComponent import com.tangem.features.home.api.HomeComponent
import com.tangem.features.hotwallet.* import com.tangem.features.hotwallet.*
import com.tangem.features.kyc.KycComponent 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.ChooseManagedTokensComponent
import com.tangem.features.managetokens.component.ManageTokensComponent import com.tangem.features.managetokens.component.ManageTokensComponent
import com.tangem.features.managetokens.component.ManageTokensMode 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.SendComponent
import com.tangem.features.send.api.SendEntryPointComponent import com.tangem.features.send.api.SendEntryPointComponent
import com.tangem.features.staking.api.StakingComponent import com.tangem.features.staking.api.StakingComponent
import com.tangem.features.survey.SurveyComponent
import com.tangem.features.swap.SwapComponent 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.TangemPayDetailsContainerComponent
import com.tangem.features.tangempay.components.TangemPayHotWalletOnboardingComponent
import com.tangem.features.tangempay.components.TangemPayOnboardingComponent import com.tangem.features.tangempay.components.TangemPayOnboardingComponent
import com.tangem.features.tangempay.components.TangemPayOnboardingComponent.Params.* import com.tangem.features.tangempay.components.TangemPayOnboardingComponent.Params.*
import com.tangem.features.tokendetails.TokenDetailsComponent import com.tangem.features.tokendetails.TokenDetailsComponent
@ -307,6 +307,7 @@ internal class ChildFactory @Inject constructor(
userWalletId = route.userWalletId, userWalletId = route.userWalletId,
currency = route.currency, currency = route.currency,
navigationAction = route.navigationAction, navigationAction = route.navigationAction,
shouldShowMarketBlock = route.shouldShowMarketBlock,
), ),
componentFactory = tokenDetailsComponentFactory, componentFactory = tokenDetailsComponentFactory,
) )

View file

@ -64,6 +64,7 @@ sealed class AppRoute(val path: String) : Route {
val userWalletId: UserWalletId, val userWalletId: UserWalletId,
val currency: CryptoCurrency, val currency: CryptoCurrency,
val navigationAction: NavigationAction? = null, val navigationAction: NavigationAction? = null,
val shouldShowMarketBlock: Boolean = true,
) : AppRoute(path = "/currency_details/${userWalletId.stringValue}/${currency.id.value}") ) : AppRoute(path = "/currency_details/${userWalletId.stringValue}/${currency.id.value}")
@Serializable @Serializable

View file

@ -76,7 +76,7 @@ internal class DefaultMarketsTokenDetailsComponent(
} }
private val portfolioBlockComponent: PortfolioBlockComponent? = private val portfolioBlockComponent: PortfolioBlockComponent? =
if (designFeatureToggles.isRedesignEnabled) { if (updatedParams.shouldShowPortfolio && designFeatureToggles.isRedesignEnabled) {
portfolioBlockComponentFactory.create( portfolioBlockComponentFactory.create(
context = child("portfolio_block"), context = child("portfolio_block"),
params = PortfolioBlockComponent.Params(token = updatedParams.token), params = PortfolioBlockComponent.Params(token = updatedParams.token),

View file

@ -401,6 +401,7 @@ internal class MarketsTokenDetailsModel @Inject constructor(
AppRoute.CurrencyDetails( AppRoute.CurrencyDetails(
userWalletId = result.wallet.walletId, userWalletId = result.wallet.walletId,
currency = result.addedCurrency.currency, currency = result.addedCurrency.currency,
shouldShowMarketBlock = false,
), ),
) )
} }

View file

@ -12,6 +12,7 @@ interface TokenDetailsComponent : ComposableContentComponent {
val userWalletId: UserWalletId, val userWalletId: UserWalletId,
val currency: CryptoCurrency, val currency: CryptoCurrency,
val navigationAction: NavigationAction? = null, val navigationAction: NavigationAction? = null,
val shouldShowMarketBlock: Boolean = true,
) )
interface Factory : ComponentFactory<Params, TokenDetailsComponent> interface Factory : ComponentFactory<Params, TokenDetailsComponent>

View file

@ -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.TokenDetailsScreen
import com.tangem.feature.tokendetails.presentation.tokendetails.ui.TokenDetailsScreenLegacy import com.tangem.feature.tokendetails.presentation.tokendetails.ui.TokenDetailsScreenLegacy
import com.tangem.feature.tokendetails.presentation.tokendetails.ui.bottomsheet.ChooseAddressBottomSheetComponent 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.CloreMigrationBottomSheetComponent
import com.tangem.feature.tokendetails.presentation.tokendetails.ui.bottomsheet.DynamicAddressesBottomSheetComponent import com.tangem.feature.tokendetails.presentation.tokendetails.ui.bottomsheet.DynamicAddressesBottomSheetComponent
import com.tangem.feature.tokendetails.presentation.tokendetails.ui.bottomsheet.TransferBottomSheetComponent 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.markets.token.block.TokenMarketBlockComponent
import com.tangem.features.rating.RatingComponent
import com.tangem.features.tokendetails.ExpressTransactionsComponent import com.tangem.features.tokendetails.ExpressTransactionsComponent
import com.tangem.features.tokendetails.TokenDetailsComponent import com.tangem.features.tokendetails.TokenDetailsComponent
import com.tangem.features.tokenreceive.TokenReceiveComponent import com.tangem.features.tokenreceive.TokenReceiveComponent
@ -88,12 +88,14 @@ internal class DefaultTokenDetailsComponent @AssistedInject constructor(
}, },
) )
private val tokenMarketBlockComponent = params.currency.toTokenMarketParam()?.let { tokenMarketParams -> private val tokenMarketBlockComponent = params.currency.toTokenMarketParam()
tokenMarketBlockComponentFactory.create( ?.takeIf { params.shouldShowMarketBlock }
appComponentContext = child("tokenMarketBlockComponent"), ?.let { tokenMarketParams ->
params = tokenMarketParams, tokenMarketBlockComponentFactory.create(
) appComponentContext = child("tokenMarketBlockComponent"),
} params = tokenMarketParams,
)
}
private val yieldSupplyComponent = yieldSupplyComponentFactory.create( private val yieldSupplyComponent = yieldSupplyComponentFactory.create(
context = child("tokenYieldSupplyComponent"), context = child("tokenYieldSupplyComponent"),