From fbfef1a9b191aebd1a7b1b0fae6ef878501439b1 Mon Sep 17 00:00:00 2001 From: arealclimber Date: Sat, 17 Jun 2023 14:28:24 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20update=20candlestick=20ch?= =?UTF-8?q?art=20every=200.1s=20#842?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/lib/books/trade_book.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index aa1dd25de..4d214be48 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "src", - "version": "0.8.0+6.5", + "version": "0.8.0+9.9", "private": true, "scripts": { "dev": "next dev", diff --git a/src/lib/books/trade_book.ts b/src/lib/books/trade_book.ts index f28d22eb6..68e45b880 100644 --- a/src/lib/books/trade_book.ts +++ b/src/lib/books/trade_book.ts @@ -98,6 +98,7 @@ class TradeBook { } private resetPrediction() { + this.togglePredicting(false); clearTimeout(this.predictionTimer); } @@ -153,6 +154,7 @@ class TradeBook { private startPredictionLoop = () => { this.resetPrediction(); + this.togglePredicting(true); // Info: setTimeout + 遞迴 (20230522 - Shirley) this.predictionTimer = setTimeout(() => {