@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 +1 -1
- package/lib/browser/constants/spotMarkets.js +2 -2
- package/lib/browser/driftClient.js +2 -2
- package/lib/node/constants/spotMarkets.js +2 -2
- package/lib/node/driftClient.js +2 -2
- package/package.json +1 -1
- package/src/constants/spotMarkets.ts +2 -2
- package/src/driftClient.ts +2 -2
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.98.0-beta.
|
|
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('
|
|
13
|
-
oracleSource: __1.OracleSource.
|
|
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
|
|
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('
|
|
13
|
-
oracleSource: __1.OracleSource.
|
|
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,
|
package/lib/node/driftClient.js
CHANGED
|
@@ -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
|
|
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
|
@@ -33,8 +33,8 @@ export const DevnetSpotMarkets: SpotMarketConfig[] = [
|
|
|
33
33
|
{
|
|
34
34
|
symbol: 'USDC',
|
|
35
35
|
marketIndex: 0,
|
|
36
|
-
oracle: new PublicKey('
|
|
37
|
-
oracleSource: OracleSource.
|
|
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,
|
package/src/driftClient.ts
CHANGED
|
@@ -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
|
|
830
|
+
if (authorityChanged && this.userStats) {
|
|
831
|
+
if (this.userStats.isSubscribed) {
|
|
832
832
|
await this.userStats.unsubscribe();
|
|
833
833
|
}
|
|
834
834
|
|