tardis-dev
Advanced tools
Comparing version 13.22.0 to 13.22.1
@@ -32,2 +32,3 @@ import { BookChange, BookTicker, Trade } from '../types'; | ||
asks: CoinbaseSnapshotBookLevel[]; | ||
time?: string; | ||
}; | ||
@@ -34,0 +35,0 @@ type CoinbaseUpdateBookLevel = ['buy' | 'sell', string, string]; |
@@ -76,2 +76,15 @@ "use strict"; | ||
if (message.type === 'snapshot') { | ||
let timestamp; | ||
if (message.time !== undefined) { | ||
timestamp = new Date(message.time); | ||
if (timestamp.valueOf() < 0) { | ||
timestamp = localTimestamp; | ||
} | ||
else { | ||
timestamp.μs = (0, handy_1.parseμs)(message.time); | ||
} | ||
} | ||
else { | ||
timestamp = localTimestamp; | ||
} | ||
yield { | ||
@@ -84,3 +97,3 @@ type: 'book_change', | ||
asks: message.asks.map(mapSnapshotBookLevel).filter(validAmountsOnly), | ||
timestamp: localTimestamp, | ||
timestamp, | ||
localTimestamp | ||
@@ -87,0 +100,0 @@ }; |
{ | ||
"name": "tardis-dev", | ||
"version": "13.22.0", | ||
"version": "13.22.1", | ||
"engines": { | ||
@@ -5,0 +5,0 @@ "node": ">=12" |
@@ -90,2 +90,14 @@ import { parseμs, upperCaseSymbols } from '../handy' | ||
if (message.type === 'snapshot') { | ||
let timestamp | ||
if (message.time !== undefined) { | ||
timestamp = new Date(message.time) | ||
if (timestamp.valueOf() < 0) { | ||
timestamp = localTimestamp | ||
} else { | ||
timestamp.μs = parseμs(message.time) | ||
} | ||
} else { | ||
timestamp = localTimestamp | ||
} | ||
yield { | ||
@@ -98,3 +110,3 @@ type: 'book_change', | ||
asks: message.asks.map(mapSnapshotBookLevel).filter(validAmountsOnly), | ||
timestamp: localTimestamp, | ||
timestamp, | ||
localTimestamp | ||
@@ -187,2 +199,3 @@ } | ||
asks: CoinbaseSnapshotBookLevel[] | ||
time?: string | ||
} | ||
@@ -189,0 +202,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
1781965
32929