@drift-labs/sdk 2.38.1-beta.12 → 2.38.1-beta.13

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.38.1-beta.12
1
+ 2.38.1-beta.13
package/lib/user.js CHANGED
@@ -1834,7 +1834,7 @@ class User {
1834
1834
  const spotMarketAccount = this.driftClient.getQuoteSpotMarketAccount();
1835
1835
  const oraclePriceData = this.getOracleDataForSpotMarket(numericConstants_1.QUOTE_SPOT_MARKET_INDEX);
1836
1836
  const baseAssetValue = (0, _1.getTokenValue)(netQuoteValue, spotMarketAccount.decimals, oraclePriceData);
1837
- const { weight, weightedTokenValue } = (0, spotPosition_1.calculateWeightedTokenValue)(netQuoteValue, baseAssetValue, oraclePriceData, spotMarketAccount, marginCategory);
1837
+ const { weight, weightedTokenValue } = (0, spotPosition_1.calculateWeightedTokenValue)(netQuoteValue, baseAssetValue, oraclePriceData.price, spotMarketAccount, marginCategory);
1838
1838
  if (netQuoteValue.lt(numericConstants_1.ZERO)) {
1839
1839
  healthComponents.borrows.push({
1840
1840
  marketIndex: spotMarketAccount.marketIndex,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drift-labs/sdk",
3
- "version": "2.38.1-beta.12",
3
+ "version": "2.38.1-beta.13",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "author": "crispheaney",
package/src/user.ts CHANGED
@@ -3320,7 +3320,7 @@ export class User {
3320
3320
  const { weight, weightedTokenValue } = calculateWeightedTokenValue(
3321
3321
  netQuoteValue,
3322
3322
  baseAssetValue,
3323
- oraclePriceData,
3323
+ oraclePriceData.price,
3324
3324
  spotMarketAccount,
3325
3325
  marginCategory
3326
3326
  );