Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tardis-dev

Package Overview
Dependencies
Maintainers
1
Versions
272
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tardis-dev - npm Package Compare versions

Comparing version 13.21.0 to 13.21.1

3

dist/mappers/gateio.d.ts

@@ -6,6 +6,7 @@ import { CircularBuffer } from '../handy';

protected readonly exchange: Exchange;
protected readonly ignoreBookSnapshotOverlapError: boolean;
protected readonly symbolToDepthInfoMapping: {
[key: string]: LocalDepthInfo;
};
constructor(exchange: Exchange);
constructor(exchange: Exchange, ignoreBookSnapshotOverlapError: boolean);
canHandle(message: GateV4OrderBookUpdate | Gatev4OrderBookSnapshot): boolean;

@@ -12,0 +13,0 @@ getFilters(symbols?: string[]): {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GateIOBookChangeMapper = exports.GateIOTradesMapper = exports.GateIOV4TradesMapper = exports.GateIOV4BookTickerMapper = exports.GateIOV4BookChangeMapper = void 0;
const debug_1 = require("../debug");
const handy_1 = require("../handy");
//v4
class GateIOV4BookChangeMapper {
constructor(exchange) {
constructor(exchange, ignoreBookSnapshotOverlapError) {
this.exchange = exchange;
this.ignoreBookSnapshotOverlapError = ignoreBookSnapshotOverlapError;
this.symbolToDepthInfoMapping = {};

@@ -117,3 +119,9 @@ }

const message = `Book depth snapshot has no overlap with first update, update ${JSON.stringify(depthUpdateData)}, lastUpdateId: ${lastUpdateId}, exchange ${this.exchange}`;
throw new Error(message);
if (this.ignoreBookSnapshotOverlapError) {
depthContext.validatedFirstUpdate = true;
(0, debug_1.debug)(message);
}
else {
throw new Error(message);
}
}

@@ -120,0 +128,0 @@ }

@@ -194,3 +194,5 @@ "use strict";

delta: (localTimestamp) => new delta_1.DeltaBookChangeMapper(localTimestamp.valueOf() >= new Date('2023-04-01').valueOf()),
'gate-io': (localTimestamp) => shouldUseGateIOV4Mappers(localTimestamp) ? new gateio_1.GateIOV4BookChangeMapper('gate-io') : new gateio_1.GateIOBookChangeMapper('gate-io'),
'gate-io': (localTimestamp) => shouldUseGateIOV4Mappers(localTimestamp)
? new gateio_1.GateIOV4BookChangeMapper('gate-io', isRealTime(localTimestamp) == false)
: new gateio_1.GateIOBookChangeMapper('gate-io'),
'gate-io-futures': () => new gateiofutures_1.GateIOFuturesBookChangeMapper('gate-io-futures'),

@@ -197,0 +199,0 @@ poloniex: (localTimestamp) => shouldUsePoloniexV2Mappers(localTimestamp) ? new poloniex_1.PoloniexV2BookChangeMapper() : new poloniex_1.PoloniexBookChangeMapper(),

{
"name": "tardis-dev",
"version": "13.21.0",
"version": "13.21.1",
"engines": {

@@ -5,0 +5,0 @@ "node": ">=12"

@@ -0,1 +1,2 @@

import { debug } from '../debug'
import { CircularBuffer, upperCaseSymbols } from '../handy'

@@ -12,3 +13,3 @@ import { BookChange, BookTicker, Exchange, Trade } from '../types'

constructor(protected readonly exchange: Exchange) {}
constructor(protected readonly exchange: Exchange, protected readonly ignoreBookSnapshotOverlapError: boolean) {}

@@ -137,3 +138,8 @@ canHandle(message: GateV4OrderBookUpdate | Gatev4OrderBookSnapshot) {

throw new Error(message)
if (this.ignoreBookSnapshotOverlapError) {
depthContext.validatedFirstUpdate = true
debug(message)
} else {
throw new Error(message)
}
}

@@ -140,0 +146,0 @@ }

@@ -301,3 +301,5 @@ import { ONE_SEC_IN_MS } from '../handy'

'gate-io': (localTimestamp: Date) =>
shouldUseGateIOV4Mappers(localTimestamp) ? new GateIOV4BookChangeMapper('gate-io') : new GateIOBookChangeMapper('gate-io'),
shouldUseGateIOV4Mappers(localTimestamp)
? new GateIOV4BookChangeMapper('gate-io', isRealTime(localTimestamp) == false)
: new GateIOBookChangeMapper('gate-io'),
'gate-io-futures': () => new GateIOFuturesBookChangeMapper('gate-io-futures'),

@@ -304,0 +306,0 @@ poloniex: (localTimestamp: Date) =>

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc