Bug Fix: Fast Forward in the Future

This commit is contained in:
Smidy13 committed 2021-09-12 20:51:13 +12:00
1 parent 585bb001ba
commit 9b1a54999a
1 file changed
+5
@@ -494,6 +494,11 @@
while (foundDate !== true) {
/* If we are in the future then return the current (blank) array */
if (new Date(since) <= new Date) {
return OHLCVs
}
await new Promise(resolve => setTimeout(resolve, rateLimit)) // rate limit
const nextValidOHLCVs = useFetchTradesForFetchOHLCVs ?
await fetchTradesForOHLCV(symbol, '1m', since, limit, params) :