From 8147ca60e2afd24b036abf8eec95de51bc14ce13 Mon Sep 17 00:00:00 2001 From: XiaoYhun Date: Wed, 18 Oct 2023 10:40:31 +0700 Subject: [PATCH] fix SR levels label spammed multiple time (#2291) * fix SR levels label spammed multiple time * update env * Update pr.yaml --- src/pages/TrueSightV2/components/chart/index.tsx | 5 ++--- src/pages/TrueSightV2/pages/TechnicalAnalysis.tsx | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/pages/TrueSightV2/components/chart/index.tsx b/src/pages/TrueSightV2/components/chart/index.tsx index bada9126fa..935c25bc02 100644 --- a/src/pages/TrueSightV2/components/chart/index.tsx +++ b/src/pages/TrueSightV2/components/chart/index.tsx @@ -2781,9 +2781,8 @@ export const Prochart = ({ const subscriptionDataLoaded = tvWidget?.activeChart()?.onDataLoaded() subscriptionDataLoaded?.subscribe(null, handleDataLoaded, true) - if (!showSRLevels) { - removeSRLevels() - } else { + removeSRLevels() + if (showSRLevels) { addSRLevels() } } catch (error) {} diff --git a/src/pages/TrueSightV2/pages/TechnicalAnalysis.tsx b/src/pages/TrueSightV2/pages/TechnicalAnalysis.tsx index 5be2aa2547..1686aa0557 100644 --- a/src/pages/TrueSightV2/pages/TechnicalAnalysis.tsx +++ b/src/pages/TrueSightV2/pages/TechnicalAnalysis.tsx @@ -96,7 +96,7 @@ export default function TechnicalAnalysis() { candleSize: priceChartResolution, currency: liveChartTab === ChartTab.First ? 'USD' : 'BTC', }, - { skip: !chain || !address }, + { skip: !chain || !address, pollingInterval: 60000 }, ) const SRLevels: ISRLevel[] = useMemo(() => {