@drift-labs/sdk 2.48.0-beta.7 → 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.7
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,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drift-labs/sdk",
3
- "version": "2.48.0-beta.7",
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,