@drift-labs/sdk 2.97.0-beta.13 → 2.97.0-beta.15

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.97.0-beta.13
1
+ 2.97.0-beta.15
@@ -659,9 +659,9 @@ exports.MainnetPerpMarkets = [
659
659
  symbol: 'CLOUD-PERP',
660
660
  baseAssetSymbol: 'CLOUD',
661
661
  marketIndex: 31,
662
- oracle: new web3_js_1.PublicKey('4FG7UyPkszGvcSVCCKaLSZsArGjyxitwhJeQhYu2bFTS'),
662
+ oracle: new web3_js_1.PublicKey('FNFejcXENaPgKaCTfstew9vSSvdQPnXjGTkJjUnnYvHU'),
663
663
  launchTs: 1717597648000,
664
- oracleSource: __1.OracleSource.SWITCHBOARD,
664
+ oracleSource: __1.OracleSource.SWITCHBOARD_ON_DEMAND,
665
665
  },
666
666
  {
667
667
  fullName: 'IO',
package/lib/user.js CHANGED
@@ -1134,7 +1134,10 @@ class User {
1134
1134
  return (this.getUserAccount().status & types_1.UserStatus.BANKRUPT) > 0;
1135
1135
  }
1136
1136
  isHighLeverageMode() {
1137
- return (0, types_1.isVariant)(this.getUserAccount().marginMode, 'highLeverage');
1137
+ if (this.getUserAccount().marginMode) {
1138
+ return (0, types_1.isVariant)(this.getUserAccount().marginMode, 'highLeverage');
1139
+ }
1140
+ return false;
1138
1141
  }
1139
1142
  /**
1140
1143
  * Checks if any user position cumulative funding differs from respective market cumulative funding
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drift-labs/sdk",
3
- "version": "2.97.0-beta.13",
3
+ "version": "2.97.0-beta.15",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "author": "crispheaney",
@@ -728,9 +728,9 @@ export const MainnetPerpMarkets: PerpMarketConfig[] = [
728
728
  symbol: 'CLOUD-PERP',
729
729
  baseAssetSymbol: 'CLOUD',
730
730
  marketIndex: 31,
731
- oracle: new PublicKey('4FG7UyPkszGvcSVCCKaLSZsArGjyxitwhJeQhYu2bFTS'),
731
+ oracle: new PublicKey('FNFejcXENaPgKaCTfstew9vSSvdQPnXjGTkJjUnnYvHU'),
732
732
  launchTs: 1717597648000,
733
- oracleSource: OracleSource.SWITCHBOARD,
733
+ oracleSource: OracleSource.SWITCHBOARD_ON_DEMAND,
734
734
  },
735
735
  {
736
736
  fullName: 'IO',
package/src/user.ts CHANGED
@@ -2159,7 +2159,10 @@ export class User {
2159
2159
  }
2160
2160
 
2161
2161
  public isHighLeverageMode(): boolean {
2162
- return isVariant(this.getUserAccount().marginMode, 'highLeverage');
2162
+ if (this.getUserAccount().marginMode) {
2163
+ return isVariant(this.getUserAccount().marginMode, 'highLeverage');
2164
+ }
2165
+ return false;
2163
2166
  }
2164
2167
 
2165
2168
  /**