@gearbox-protocol/sdk 3.0.0-next.227 → 3.0.0-next.228

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.
@@ -148,6 +148,6 @@ export declare class CreditAccountData {
148
148
  * Calculates the time remaining until liquidation for a credit account.
149
149
  * @returns The time remaining until liquidation in milliseconds.
150
150
  */
151
- static getTimeToLiquidation({ healthFactor, totalBorrowRate_debt, }: TimeToLiquidationProps): bigint;
151
+ static getTimeToLiquidation({ healthFactor, totalBorrowRate_debt, }: TimeToLiquidationProps): bigint | null;
152
152
  }
153
153
  export {};
@@ -405,7 +405,7 @@ class CreditAccountData {
405
405
  */
406
406
  static getTimeToLiquidation({ healthFactor, totalBorrowRate_debt, }) {
407
407
  if (healthFactor <= sdk_gov_1.PERCENTAGE_FACTOR || totalBorrowRate_debt === 0n)
408
- return 0n;
408
+ return null;
409
409
  // (HF - 1) / (br_D / year) or (HF - 1) * (year / br_D)
410
410
  const HF_1 = BigInt(healthFactor) - sdk_gov_1.PERCENTAGE_FACTOR;
411
411
  const brPerYear = (BigInt(sdk_gov_1.SECONDS_PER_YEAR) * sdk_gov_1.PERCENTAGE_FACTOR * sdk_gov_1.PERCENTAGE_DECIMALS) /
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "3.0.0-next.227",
3
+ "version": "3.0.0-next.228",
4
4
  "description": "Gearbox SDK",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",