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

serum-vial

Package Overview
Dependencies
Maintainers
1
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serum-vial - npm Package Compare versions

Comparing version 0.9.6 to 0.9.7

2

dist/data_mapper.d.ts

@@ -14,3 +14,3 @@ import { Market } from '@project-serum/serum';

private _lastSeenSeqNum;
private _lastL3DiffWasInvalid;
private _invalidSubsequentL3DiffsCount;
private _currentL2Snapshot;

@@ -17,0 +17,0 @@ private _currentQuote;

@@ -20,3 +20,3 @@ "use strict";

this._lastSeenSeqNum = undefined;
this._lastL3DiffWasInvalid = false;
this._invalidSubsequentL3DiffsCount = 0;
this._currentL2Snapshot = undefined;

@@ -108,3 +108,3 @@ this._currentQuote = undefined;

const diffIsValid = this._validateL3DiffCorrectness(l3Diff);
if (diffIsValid === false && this._lastL3DiffWasInvalid) {
if (diffIsValid === false && this._invalidSubsequentL3DiffsCount >= 2) {
logger_1.logger.log('warn', 'Resetting data mapper state due to invalid l3diff', {

@@ -120,3 +120,8 @@ market: this._options.symbol,

}
this._lastL3DiffWasInvalid = diffIsValid === false;
if (diffIsValid == false) {
this._invalidSubsequentL3DiffsCount++;
}
else {
this._invalidSubsequentL3DiffsCount = 0;
}
}

@@ -290,3 +295,3 @@ // initialize only when we have both asks and bids accounts data

this._currentQuote = undefined;
this._lastL3DiffWasInvalid = false;
this._invalidSubsequentL3DiffsCount = 0;
}

@@ -293,0 +298,0 @@ _validateL3DiffCorrectness(l3Diff) {

{
"name": "serum-vial",
"version": "0.9.6",
"version": "0.9.7",
"engines": {

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

@@ -39,3 +39,3 @@ import { EVENT_QUEUE_LAYOUT, Market, Orderbook, getLayoutVersion } from '@project-serum/serum'

private _lastSeenSeqNum: number | undefined = undefined
private _lastL3DiffWasInvalid = false
private _invalidSubsequentL3DiffsCount = 0

@@ -143,3 +143,3 @@ private _currentL2Snapshot:

if (diffIsValid === false && this._lastL3DiffWasInvalid) {
if (diffIsValid === false && this._invalidSubsequentL3DiffsCount >= 2) {
logger.log('warn', 'Resetting data mapper state due to invalid l3diff', {

@@ -155,4 +155,7 @@ market: this._options.symbol,

}
this._lastL3DiffWasInvalid = diffIsValid === false
if (diffIsValid == false) {
this._invalidSubsequentL3DiffsCount++
} else {
this._invalidSubsequentL3DiffsCount = 0
}
}

@@ -375,3 +378,3 @@

this._currentQuote = undefined
this._lastL3DiffWasInvalid = false
this._invalidSubsequentL3DiffsCount = 0
}

@@ -378,0 +381,0 @@

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