@t2000/sdk 0.16.24 → 0.16.25

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.
@@ -837,7 +837,7 @@ async function maxWithdrawAmount(client, addressOrKeypair) {
837
837
  maxAmount = Math.max(0, hf.supplied - hf.borrowed * MIN_HEALTH_FACTOR / ltv);
838
838
  }
839
839
  const remainingSupply = hf.supplied - maxAmount;
840
- const hfAfter = hf.borrowed > 0 ? remainingSupply / hf.borrowed : Infinity;
840
+ const hfAfter = hf.borrowed > 0 ? remainingSupply * ltv / hf.borrowed : Infinity;
841
841
  return { maxAmount, healthFactorAfter: hfAfter, currentHF: hf.healthFactor };
842
842
  }
843
843
  async function maxBorrowAmount(client, addressOrKeypair) {