Skip to content

Commit

Permalink
fix: 🐛 update candlestick chart every 0.1s #842
Browse files Browse the repository at this point in the history
  • Loading branch information
arealclimber committed Jun 17, 2023
1 parent 4934dbf commit fbfef1a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "src",
"version": "0.8.0+6.5",
"version": "0.8.0+9.9",
"private": true,
"scripts": {
"dev": "next dev",
Expand Down
2 changes: 2 additions & 0 deletions src/lib/books/trade_book.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ class TradeBook {
}

private resetPrediction() {
this.togglePredicting(false);
clearTimeout(this.predictionTimer);
}

Expand Down Expand Up @@ -153,6 +154,7 @@ class TradeBook {

private startPredictionLoop = () => {
this.resetPrediction();
this.togglePredicting(true);

// Info: setTimeout + 遞迴 (20230522 - Shirley)
this.predictionTimer = setTimeout(() => {
Expand Down

0 comments on commit fbfef1a

Please sign in to comment.