tardis-dev
Advanced tools
Comparing version 10.0.25 to 10.0.26
@@ -23,2 +23,3 @@ "use strict"; | ||
*map(okexTradesMessage, localTimestamp) { | ||
let seenSymbol = undefined; | ||
for (const okexTrade of okexTradesMessage.data) { | ||
@@ -30,3 +31,3 @@ // ignore trades that are first time encountered for a given symbol and that have timestamp day different that local timestamp day | ||
if (this._seenSymbols.has(symbol) === false) { | ||
this._seenSymbols.add(symbol); | ||
seenSymbol = symbol; | ||
if (timestamp.getUTCDate() !== localTimestamp.getUTCDate()) { | ||
@@ -48,2 +49,5 @@ continue; | ||
} | ||
if (seenSymbol !== undefined) { | ||
this._seenSymbols.add(seenSymbol); | ||
} | ||
} | ||
@@ -50,0 +54,0 @@ } |
{ | ||
"name": "tardis-dev", | ||
"version": "10.0.25", | ||
"version": "10.0.26", | ||
"engines": { | ||
@@ -5,0 +5,0 @@ "node": ">=12" |
@@ -24,2 +24,3 @@ import { BookChange, DerivativeTicker, Exchange, FilterForExchange, Trade } from '../types' | ||
*map(okexTradesMessage: OKexTradesDataMessage, localTimestamp: Date): IterableIterator<Trade> { | ||
let seenSymbol: string | undefined = undefined | ||
for (const okexTrade of okexTradesMessage.data) { | ||
@@ -30,4 +31,6 @@ // ignore trades that are first time encountered for a given symbol and that have timestamp day different that local timestamp day | ||
const timestamp = new Date(okexTrade.timestamp) | ||
if (this._seenSymbols.has(symbol) === false) { | ||
this._seenSymbols.add(symbol) | ||
seenSymbol = symbol | ||
if (timestamp.getUTCDate() !== localTimestamp.getUTCDate()) { | ||
@@ -50,2 +53,6 @@ continue | ||
} | ||
if (seenSymbol !== undefined) { | ||
this._seenSymbols.add(seenSymbol) | ||
} | ||
} | ||
@@ -52,0 +59,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
694304
12307