@drift-labs/sdk 2.97.0-beta.24 → 2.97.0-beta.26

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.
package/VERSION CHANGED
@@ -1 +1 @@
1
- 2.97.0-beta.24
1
+ 2.97.0-beta.26
@@ -13643,6 +13643,11 @@
13643
13643
  "code": 6295,
13644
13644
  "name": "InvalidRFQOrder",
13645
13645
  "msg": "RFQ orders must be jit makers"
13646
+ },
13647
+ {
13648
+ "code": 6296,
13649
+ "name": "InvalidRFQMatch",
13650
+ "msg": "RFQ matches must be valid"
13646
13651
  }
13647
13652
  ],
13648
13653
  "metadata": {
@@ -83,21 +83,12 @@ class OrderSubscriber {
83
83
  await this.driftClient.connection._rpcRequest('getProgramAccounts', rpcRequestArgs);
84
84
  const rpcResponseAndContext = rpcJSONResponse.result;
85
85
  const slot = rpcResponseAndContext.context.slot;
86
- const programAccountSet = new Set();
87
86
  for (const programAccount of rpcResponseAndContext.value) {
88
87
  const key = programAccount.pubkey.toString();
89
- programAccountSet.add(key);
90
88
  this.tryUpdateUserAccount(key, 'raw', programAccount.account.data, slot);
91
89
  // give event loop a chance to breathe
92
90
  await new Promise((resolve) => setTimeout(resolve, 0));
93
91
  }
94
- for (const key of this.usersAccounts.keys()) {
95
- if (!programAccountSet.has(key)) {
96
- this.usersAccounts.delete(key);
97
- }
98
- // give event loop a chance to breathe
99
- await new Promise((resolve) => setTimeout(resolve, 0));
100
- }
101
92
  }
102
93
  catch (e) {
103
94
  console.error(e);
@@ -13643,6 +13643,11 @@
13643
13643
  "code": 6295,
13644
13644
  "name": "InvalidRFQOrder",
13645
13645
  "msg": "RFQ orders must be jit makers"
13646
+ },
13647
+ {
13648
+ "code": 6296,
13649
+ "name": "InvalidRFQMatch",
13650
+ "msg": "RFQ matches must be valid"
13646
13651
  }
13647
13652
  ],
13648
13653
  "metadata": {
@@ -83,21 +83,12 @@ class OrderSubscriber {
83
83
  await this.driftClient.connection._rpcRequest('getProgramAccounts', rpcRequestArgs);
84
84
  const rpcResponseAndContext = rpcJSONResponse.result;
85
85
  const slot = rpcResponseAndContext.context.slot;
86
- const programAccountSet = new Set();
87
86
  for (const programAccount of rpcResponseAndContext.value) {
88
87
  const key = programAccount.pubkey.toString();
89
- programAccountSet.add(key);
90
88
  this.tryUpdateUserAccount(key, 'raw', programAccount.account.data, slot);
91
89
  // give event loop a chance to breathe
92
90
  await new Promise((resolve) => setTimeout(resolve, 0));
93
91
  }
94
- for (const key of this.usersAccounts.keys()) {
95
- if (!programAccountSet.has(key)) {
96
- this.usersAccounts.delete(key);
97
- }
98
- // give event loop a chance to breathe
99
- await new Promise((resolve) => setTimeout(resolve, 0));
100
- }
101
92
  }
102
93
  catch (e) {
103
94
  console.error(e);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drift-labs/sdk",
3
- "version": "2.97.0-beta.24",
3
+ "version": "2.97.0-beta.26",
4
4
  "main": "lib/node/index.js",
5
5
  "types": "lib/node/index.d.ts",
6
6
  "browser": "./lib/browser/index.js",
@@ -13643,6 +13643,11 @@
13643
13643
  "code": 6295,
13644
13644
  "name": "InvalidRFQOrder",
13645
13645
  "msg": "RFQ orders must be jit makers"
13646
+ },
13647
+ {
13648
+ "code": 6296,
13649
+ "name": "InvalidRFQMatch",
13650
+ "msg": "RFQ matches must be valid"
13646
13651
  }
13647
13652
  ],
13648
13653
  "metadata": {
@@ -113,10 +113,8 @@ export class OrderSubscriber {
113
113
 
114
114
  const slot: number = rpcResponseAndContext.context.slot;
115
115
 
116
- const programAccountSet = new Set<string>();
117
116
  for (const programAccount of rpcResponseAndContext.value) {
118
117
  const key = programAccount.pubkey.toString();
119
- programAccountSet.add(key);
120
118
  this.tryUpdateUserAccount(
121
119
  key,
122
120
  'raw',
@@ -126,14 +124,6 @@ export class OrderSubscriber {
126
124
  // give event loop a chance to breathe
127
125
  await new Promise((resolve) => setTimeout(resolve, 0));
128
126
  }
129
-
130
- for (const key of this.usersAccounts.keys()) {
131
- if (!programAccountSet.has(key)) {
132
- this.usersAccounts.delete(key);
133
- }
134
- // give event loop a chance to breathe
135
- await new Promise((resolve) => setTimeout(resolve, 0));
136
- }
137
127
  } catch (e) {
138
128
  console.error(e);
139
129
  } finally {