@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 +1 -1
- package/package.json +1 -1
- package/src/user.ts +1 -1
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
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;
|