@t2000/sdk 0.16.24 → 0.16.26
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/dist/adapters/index.cjs +1 -1
- package/dist/adapters/index.cjs.map +1 -1
- package/dist/adapters/index.js +1 -1
- package/dist/adapters/index.js.map +1 -1
- package/dist/index.cjs +13 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +13 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/adapters/index.js
CHANGED
|
@@ -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) {
|