@drift-labs/sdk 2.0.5 → 2.0.6

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/lib/user.js CHANGED
@@ -602,7 +602,7 @@ class User {
602
602
  return totalAssetValue.mul(numericConstants_1.TEN_THOUSAND).div(totalLiabilityValue);
603
603
  }
604
604
  canBeLiquidated() {
605
- const totalCollateral = this.getTotalCollateral();
605
+ const totalCollateral = this.getTotalCollateral('Maintenance');
606
606
  // if user being liq'd, can continue to be liq'd until total collateral above the margin requirement plus buffer
607
607
  let liquidationBuffer = undefined;
608
608
  const isBeingLiquidated = (0, types_1.isVariant)(this.getUserAccount().status, 'beingLiquidated');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drift-labs/sdk",
3
- "version": "2.0.5",
3
+ "version": "2.0.6",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "author": "crispheaney",
package/src/user.ts CHANGED
@@ -1021,7 +1021,7 @@ export class User {
1021
1021
  }
1022
1022
 
1023
1023
  public canBeLiquidated(): boolean {
1024
- const totalCollateral = this.getTotalCollateral();
1024
+ const totalCollateral = this.getTotalCollateral('Maintenance');
1025
1025
 
1026
1026
  // if user being liq'd, can continue to be liq'd until total collateral above the margin requirement plus buffer
1027
1027
  let liquidationBuffer = undefined;