@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 +1 -1
- package/lib/user.js +1 -1
- package/package.json +1 -1
- package/src/user.ts +1 -1
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.38.1-beta.
|
|
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
package/src/user.ts
CHANGED