@drift-labs/sdk 2.35.1-beta.1 → 2.35.1-beta.2

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.35.1-beta.1
1
+ 2.35.1-beta.2
package/lib/user.js CHANGED
@@ -289,7 +289,7 @@ class User {
289
289
  let dustBaseAssetValue = numericConstants_1.ZERO;
290
290
  if (burnLpShares && position.remainderBaseAssetAmount != 0) {
291
291
  const oraclePriceData = this.driftClient.getOracleDataForPerpMarket(position.marketIndex);
292
- dustBaseAssetValue = _1.BN.abs(position.remainderBaseAssetAmount)
292
+ dustBaseAssetValue = new _1.BN(Math.abs(position.remainderBaseAssetAmount))
293
293
  .mul(oraclePriceData.price)
294
294
  .div(numericConstants_1.AMM_RESERVE_PRECISION)
295
295
  .add(numericConstants_1.ONE);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drift-labs/sdk",
3
- "version": "2.35.1-beta.1",
3
+ "version": "2.35.1-beta.2",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "author": "crispheaney",
package/src/user.ts CHANGED
@@ -477,7 +477,7 @@ export class User {
477
477
  const oraclePriceData = this.driftClient.getOracleDataForPerpMarket(
478
478
  position.marketIndex
479
479
  );
480
- dustBaseAssetValue = BN.abs(position.remainderBaseAssetAmount)
480
+ dustBaseAssetValue = new BN(Math.abs(position.remainderBaseAssetAmount))
481
481
  .mul(oraclePriceData.price)
482
482
  .div(AMM_RESERVE_PRECISION)
483
483
  .add(ONE);