From d5e9a806a03cc4759396be10ff21c0d4ca85b139 Mon Sep 17 00:00:00 2001 From: manish-rorotechnology Date: Mon, 9 Nov 2026 15:31:40 +0530 Subject: [PATCH] Hide price alerts on CoinGecko charts that do not publish a live price. Swap and margin charts keep the alert tool. Co-authored-by: Cursor --- apps/web/components/markets/CoinChart.tsx | 1 + apps/web/components/trading-chart/DrawingToolbar.tsx | 5 ++++- apps/web/components/trading-chart/ProChart.tsx | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/web/components/markets/CoinChart.tsx b/apps/web/components/markets/CoinChart.tsx index 6ce8d684..afd7970f 100644 --- a/apps/web/components/markets/CoinChart.tsx +++ b/apps/web/components/markets/CoinChart.tsx @@ -52,6 +52,7 @@ export default function CoinChart({ pageSize={Number.isFinite(range.bars) ? Math.max(300, range.bars + 10) : 1000} heightClassName="h-[420px] md:h-[520px]" onLastBar={onLastBar} + alerts={!symbol.startsWith("COINGECKO:")} /> ); } diff --git a/apps/web/components/trading-chart/DrawingToolbar.tsx b/apps/web/components/trading-chart/DrawingToolbar.tsx index 05bf7be2..6df848d9 100644 --- a/apps/web/components/trading-chart/DrawingToolbar.tsx +++ b/apps/web/components/trading-chart/DrawingToolbar.tsx @@ -80,6 +80,7 @@ export default function DrawingToolbar({ drawingCount, onClearAll, accent, + alerts = true, }: { tool: DrawingTool; onTool: (tool: DrawingTool) => void; @@ -90,8 +91,10 @@ export default function DrawingToolbar({ drawingCount: number; onClearAll: () => void; accent: AccentClasses; + alerts?: boolean; }) { const t = useTranslations("TradingChart"); + const tools = alerts ? TOOLS : TOOLS.filter((key) => key !== "alert"); return (
- {TOOLS.map((key) => ( + {tools.map((key) => (