@drift-labs/sdk 2.48.0-beta.6 → 2.48.0-beta.8

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.48.0-beta.6
1
+ 2.48.0-beta.8
@@ -54,7 +54,7 @@ class PollingUserAccountSubscriber {
54
54
  async fetch() {
55
55
  var _a, _b;
56
56
  const dataAndContext = await this.program.account.user.fetchAndContext(this.userAccountPublicKey, this.accountLoader.commitment);
57
- if ((_b = dataAndContext.context.slot > ((_a = this.user) === null || _a === void 0 ? void 0 : _a.slot)) !== null && _b !== void 0 ? _b : 0) {
57
+ if (dataAndContext.context.slot > ((_b = (_a = this.user) === null || _a === void 0 ? void 0 : _a.slot) !== null && _b !== void 0 ? _b : 0)) {
58
58
  this.user = {
59
59
  data: dataAndContext.data,
60
60
  slot: dataAndContext.context.slot,
@@ -54,7 +54,7 @@ class PollingUserStatsAccountSubscriber {
54
54
  async fetch() {
55
55
  var _a, _b;
56
56
  const dataAndContext = await this.program.account.userStats.fetchAndContext(this.userStatsAccountPublicKey, this.accountLoader.commitment);
57
- if ((_b = dataAndContext.context.slot > ((_a = this.userStats) === null || _a === void 0 ? void 0 : _a.slot)) !== null && _b !== void 0 ? _b : 0) {
57
+ if (dataAndContext.context.slot > ((_b = (_a = this.userStats) === null || _a === void 0 ? void 0 : _a.slot) !== null && _b !== void 0 ? _b : 0)) {
58
58
  this.userStats = {
59
59
  data: dataAndContext.data,
60
60
  slot: dataAndContext.context.slot,
@@ -1150,7 +1150,7 @@ class DriftClient {
1150
1150
  withdrawIxs.push((0, spl_token_1.createCloseAccountInstruction)(associatedTokenAddress, authority, authority, []));
1151
1151
  }
1152
1152
  const tx = await this.buildTransaction(withdrawIxs, {
1153
- computeUnits: 600000,
1153
+ computeUnits: 1400000,
1154
1154
  });
1155
1155
  const { txSig, slot } = await this.sendTransaction(tx, additionalSigners, this.opts);
1156
1156
  this.spotMarketLastSlotCache.set(marketIndex, slot);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drift-labs/sdk",
3
- "version": "2.48.0-beta.6",
3
+ "version": "2.48.0-beta.8",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "author": "crispheaney",
@@ -97,7 +97,7 @@ export class PollingUserAccountSubscriber implements UserAccountSubscriber {
97
97
  this.userAccountPublicKey,
98
98
  this.accountLoader.commitment
99
99
  );
100
- if (dataAndContext.context.slot > this.user?.slot ?? 0) {
100
+ if (dataAndContext.context.slot > (this.user?.slot ?? 0)) {
101
101
  this.user = {
102
102
  data: dataAndContext.data as UserAccount,
103
103
  slot: dataAndContext.context.slot,
@@ -101,7 +101,7 @@ export class PollingUserStatsAccountSubscriber
101
101
  this.userStatsAccountPublicKey,
102
102
  this.accountLoader.commitment
103
103
  );
104
- if (dataAndContext.context.slot > this.userStats?.slot ?? 0) {
104
+ if (dataAndContext.context.slot > (this.userStats?.slot ?? 0)) {
105
105
  this.userStats = {
106
106
  data: dataAndContext.data as UserStatsAccount,
107
107
  slot: dataAndContext.context.slot,
@@ -2028,7 +2028,7 @@ export class DriftClient {
2028
2028
  }
2029
2029
 
2030
2030
  const tx = await this.buildTransaction(withdrawIxs, {
2031
- computeUnits: 600_000,
2031
+ computeUnits: 1_400_000,
2032
2032
  });
2033
2033
  const { txSig, slot } = await this.sendTransaction(
2034
2034
  tx,