diff --git a/app/components/UI/MarketInsights/Views/MarketInsightsView/MarketInsightsView.tsx b/app/components/UI/MarketInsights/Views/MarketInsightsView/MarketInsightsView.tsx index facf0801787..dc761d86a29 100644 --- a/app/components/UI/MarketInsights/Views/MarketInsightsView/MarketInsightsView.tsx +++ b/app/components/UI/MarketInsights/Views/MarketInsightsView/MarketInsightsView.tsx @@ -153,6 +153,8 @@ interface MarketInsightsRouteParams { tokenChainId?: string; /** When true, indicates the view was opened from the Perps market details view */ isPerps?: boolean; + /** When true, the user has an existing perps position for this asset */ + hasPerpsPosition?: boolean; } /** @@ -182,6 +184,7 @@ const MarketInsightsView: React.FC = () => { tokenName, tokenChainId, isPerps = false, + hasPerpsPosition = false, } = route.params; const isMarketInsightsEnabled = isPerps @@ -660,65 +663,79 @@ const MarketInsightsView: React.FC = () => { > {strings('market_insights.helpful_prompt')} + {isPerps && hasPerpsPosition && ( + + {strings('market_insights.footer_disclaimer')} + + )} - - {isPerps ? ( - - - - - ) : ( - - + {!(isPerps && hasPerpsPosition) && ( + + {isPerps ? ( + - - + ) : ( + + + + + + + + + )} + + + {strings('market_insights.footer_disclaimer')} + - )} - - - {strings('market_insights.footer_disclaimer')} - - + )} {selectedTrend ? ( = () => { assetSymbol: market.symbol, assetIdentifier: market.symbol, isPerps: true, + hasPerpsPosition: !!existingPosition, }); - }, [market?.symbol, navigation, track]); + }, [market?.symbol, navigation, track, existingPosition]); // Handler for order selection - navigates to order details const handleOrderSelect = useCallback(