@drift-labs/sdk 2.8.0-beta.1 → 2.8.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -35,6 +35,7 @@ export declare class DLOB {
35
35
  orderLists: Map<MarketTypeStr, Map<number, MarketNodeLists>>;
36
36
  initialized: boolean;
37
37
  constructor();
38
+ private init;
38
39
  clear(): void;
39
40
  /**
40
41
  * initializes a new DLOB instance
package/lib/dlob/DLOB.js CHANGED
@@ -16,6 +16,9 @@ class DLOB {
16
16
  this.openOrders = new Map();
17
17
  this.orderLists = new Map();
18
18
  this.initialized = false;
19
+ this.init();
20
+ }
21
+ init() {
19
22
  this.openOrders.set('perp', new Set());
20
23
  this.openOrders.set('spot', new Set());
21
24
  this.orderLists.set('perp', new Map());
@@ -39,6 +42,7 @@ class DLOB {
39
42
  }
40
43
  }
41
44
  this.orderLists.clear();
45
+ this.init();
42
46
  }
43
47
  /**
44
48
  * initializes a new DLOB instance
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.8.0-beta.1",
2
+ "version": "2.8.0-beta.2",
3
3
  "name": "drift",
4
4
  "instructions": [
5
5
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drift-labs/sdk",
3
- "version": "2.8.0-beta.1",
3
+ "version": "2.8.0-beta.2",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "author": "crispheaney",
package/src/dlob/DLOB.ts CHANGED
@@ -77,6 +77,10 @@ export class DLOB {
77
77
  initialized = false;
78
78
 
79
79
  public constructor() {
80
+ this.init();
81
+ }
82
+
83
+ private init() {
80
84
  this.openOrders.set('perp', new Set<string>());
81
85
  this.openOrders.set('spot', new Set<string>());
82
86
  this.orderLists.set('perp', new Map<number, MarketNodeLists>());
@@ -102,6 +106,8 @@ export class DLOB {
102
106
  }
103
107
  }
104
108
  this.orderLists.clear();
109
+
110
+ this.init();
105
111
  }
106
112
 
107
113
  /**
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.8.0-beta.1",
2
+ "version": "2.8.0-beta.2",
3
3
  "name": "drift",
4
4
  "instructions": [
5
5
  {