@drift-labs/sdk 2.98.0-beta.4 → 2.98.0-beta.6

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.98.0-beta.4
1
+ 2.98.0-beta.6
@@ -9,8 +9,8 @@ exports.DevnetSpotMarkets = [
9
9
  {
10
10
  symbol: 'USDC',
11
11
  marketIndex: 0,
12
- oracle: new web3_js_1.PublicKey('5SSkXsEKQepHHAewytPVwdej4epN1nxgLVM84L4KXgy7'),
13
- oracleSource: __1.OracleSource.PYTH_STABLE_COIN,
12
+ oracle: new web3_js_1.PublicKey('En8hkHLkRe9d9DraYmBTrus518BvmVH448YcvmrFM6Ce'),
13
+ oracleSource: __1.OracleSource.PYTH_STABLE_COIN_PULL,
14
14
  mint: new web3_js_1.PublicKey('8zGuJQqwhZafTah7Uc7Z4tXRnguqkn5KLFAP8oV6PHe2'),
15
15
  precision: new __1.BN(10).pow(numericConstants_1.SIX),
16
16
  precisionExp: numericConstants_1.SIX,
@@ -477,8 +477,8 @@ class DriftClient {
477
477
  this.authority = authority !== null && authority !== void 0 ? authority : this.authority;
478
478
  this.userStatsAccountPublicKey = (0, pda_1.getUserStatsAccountPublicKey)(this.program.programId, this.authority);
479
479
  /* If changing the user authority ie switching from delegate to non-delegate account, need to re-subscribe to the user stats account */
480
- if (authorityChanged) {
481
- if (this.userStats && this.userStats.isSubscribed) {
480
+ if (authorityChanged && this.userStats) {
481
+ if (this.userStats.isSubscribed) {
482
482
  await this.userStats.unsubscribe();
483
483
  }
484
484
  this.userStats = new userStats_1.UserStats({
@@ -9,8 +9,8 @@ exports.DevnetSpotMarkets = [
9
9
  {
10
10
  symbol: 'USDC',
11
11
  marketIndex: 0,
12
- oracle: new web3_js_1.PublicKey('5SSkXsEKQepHHAewytPVwdej4epN1nxgLVM84L4KXgy7'),
13
- oracleSource: __1.OracleSource.PYTH_STABLE_COIN,
12
+ oracle: new web3_js_1.PublicKey('En8hkHLkRe9d9DraYmBTrus518BvmVH448YcvmrFM6Ce'),
13
+ oracleSource: __1.OracleSource.PYTH_STABLE_COIN_PULL,
14
14
  mint: new web3_js_1.PublicKey('8zGuJQqwhZafTah7Uc7Z4tXRnguqkn5KLFAP8oV6PHe2'),
15
15
  precision: new __1.BN(10).pow(numericConstants_1.SIX),
16
16
  precisionExp: numericConstants_1.SIX,
@@ -477,8 +477,8 @@ class DriftClient {
477
477
  this.authority = authority !== null && authority !== void 0 ? authority : this.authority;
478
478
  this.userStatsAccountPublicKey = (0, pda_1.getUserStatsAccountPublicKey)(this.program.programId, this.authority);
479
479
  /* If changing the user authority ie switching from delegate to non-delegate account, need to re-subscribe to the user stats account */
480
- if (authorityChanged) {
481
- if (this.userStats && this.userStats.isSubscribed) {
480
+ if (authorityChanged && this.userStats) {
481
+ if (this.userStats.isSubscribed) {
482
482
  await this.userStats.unsubscribe();
483
483
  }
484
484
  this.userStats = new userStats_1.UserStats({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drift-labs/sdk",
3
- "version": "2.98.0-beta.4",
3
+ "version": "2.98.0-beta.6",
4
4
  "main": "lib/node/index.js",
5
5
  "types": "lib/node/index.d.ts",
6
6
  "browser": "./lib/browser/index.js",
@@ -33,8 +33,8 @@ export const DevnetSpotMarkets: SpotMarketConfig[] = [
33
33
  {
34
34
  symbol: 'USDC',
35
35
  marketIndex: 0,
36
- oracle: new PublicKey('5SSkXsEKQepHHAewytPVwdej4epN1nxgLVM84L4KXgy7'),
37
- oracleSource: OracleSource.PYTH_STABLE_COIN,
36
+ oracle: new PublicKey('En8hkHLkRe9d9DraYmBTrus518BvmVH448YcvmrFM6Ce'),
37
+ oracleSource: OracleSource.PYTH_STABLE_COIN_PULL,
38
38
  mint: new PublicKey('8zGuJQqwhZafTah7Uc7Z4tXRnguqkn5KLFAP8oV6PHe2'),
39
39
  precision: new BN(10).pow(SIX),
40
40
  precisionExp: SIX,
@@ -827,8 +827,8 @@ export class DriftClient {
827
827
  );
828
828
 
829
829
  /* If changing the user authority ie switching from delegate to non-delegate account, need to re-subscribe to the user stats account */
830
- if (authorityChanged) {
831
- if (this.userStats && this.userStats.isSubscribed) {
830
+ if (authorityChanged && this.userStats) {
831
+ if (this.userStats.isSubscribed) {
832
832
  await this.userStats.unsubscribe();
833
833
  }
834
834