실시간 차트 갱신오류 수정

This commit is contained in:
Macbook
2026-05-25 03:22:46 +09:00
parent 67324ded9d
commit 3b67fca4ee
2 changed files with 42 additions and 21 deletions
+4 -1
View File
@@ -141,7 +141,7 @@ export function useStompChartData(
.then(newBars => {
if (cancelled) return;
barsRef.current = newBars;
historyReadyRef.current = newBars.length > 0;
historyReadyRef.current = true;
setBarsMarket(market);
setBars(newBars);
setLatestBar(newBars[newBars.length - 1] ?? null);
@@ -269,6 +269,9 @@ export function useStompChartData(
last1mVolRef.current = 0;
last1mTimeRef.current = 0;
void pinChartWatch(market, STOMP_TICK_CANDLE_TYPE);
if (candleType !== STOMP_TICK_CANDLE_TYPE) {
void pinChartWatch(market, candleType);
}
const topic = `/sub/charts/${market}/${STOMP_TICK_CANDLE_TYPE}`;
let alive = true;