@scallop-io/sui-scallop-sdk 0.44.8 → 0.44.9
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/constants/common.d.ts +1 -1
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/constants/common.ts +1 -1
- package/src/queries/portfolioQuery.ts +8 -1
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/constants/common.ts
|
|
2
2
|
var API_BASE_URL = "https://sui.api.scallop.io";
|
|
3
|
-
var SDK_API_BASE_URL = "https://
|
|
3
|
+
var SDK_API_BASE_URL = "https://sdk.api.scallop.io";
|
|
4
4
|
var ADDRESSES_ID = "6462a088a7ace142bb6d7e9b";
|
|
5
5
|
var PROTOCOL_OBJECT_ID = "0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf";
|
|
6
6
|
var BORROW_FEE_PROTOCOL_ID = "0xc38f849e81cfe46d4e4320f508ea7dda42934a329d5a6571bb4c3cb6ea63f5da";
|
|
@@ -2458,7 +2458,13 @@ var getObligationAccount = async (query, obligationId, ownerAddress, indexer = f
|
|
|
2458
2458
|
const requiredCollateralValue2 = depositedValue.multipliedBy(
|
|
2459
2459
|
marketCollateral.liquidationFactor
|
|
2460
2460
|
);
|
|
2461
|
-
const
|
|
2461
|
+
const poolSizeAmount = BigNumber3(marketCollateral.maxDepositAmount).minus(
|
|
2462
|
+
marketCollateral.depositAmount
|
|
2463
|
+
);
|
|
2464
|
+
const availableDepositAmount = minBigNumber(
|
|
2465
|
+
BigNumber3(coinAmount),
|
|
2466
|
+
poolSizeAmount
|
|
2467
|
+
);
|
|
2462
2468
|
const availableDepositCoin = availableDepositAmount.shiftedBy(
|
|
2463
2469
|
-1 * coinDecimal
|
|
2464
2470
|
);
|