@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 +1 -1
- package/lib/accounts/pollingUserAccountSubscriber.js +1 -1
- package/lib/accounts/pollingUserStatsAccountSubscriber.js +1 -1
- package/lib/driftClient.js +1 -1
- package/package.json +1 -1
- package/src/accounts/pollingUserAccountSubscriber.ts +1 -1
- package/src/accounts/pollingUserStatsAccountSubscriber.ts +1 -1
- package/src/driftClient.ts +1 -1
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.48.0-beta.
|
|
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 (
|
|
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 (
|
|
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/lib/driftClient.js
CHANGED
|
@@ -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:
|
|
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
|
@@ -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,
|
package/src/driftClient.ts
CHANGED