@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 +1 -1
- package/lib/constants/perpMarkets.js +2 -2
- package/lib/user.js +4 -1
- package/package.json +1 -1
- package/src/constants/perpMarkets.ts +2 -2
- package/src/user.ts +4 -1
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.97.0-beta.
|
|
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('
|
|
662
|
+
oracle: new web3_js_1.PublicKey('FNFejcXENaPgKaCTfstew9vSSvdQPnXjGTkJjUnnYvHU'),
|
|
663
663
|
launchTs: 1717597648000,
|
|
664
|
-
oracleSource: __1.OracleSource.
|
|
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
|
-
|
|
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
|
@@ -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('
|
|
731
|
+
oracle: new PublicKey('FNFejcXENaPgKaCTfstew9vSSvdQPnXjGTkJjUnnYvHU'),
|
|
732
732
|
launchTs: 1717597648000,
|
|
733
|
-
oracleSource: OracleSource.
|
|
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
|
-
|
|
2162
|
+
if (this.getUserAccount().marginMode) {
|
|
2163
|
+
return isVariant(this.getUserAccount().marginMode, 'highLeverage');
|
|
2164
|
+
}
|
|
2165
|
+
return false;
|
|
2163
2166
|
}
|
|
2164
2167
|
|
|
2165
2168
|
/**
|