@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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const API_BASE_URL = "https://sui.api.scallop.io";
|
|
2
|
-
export declare const SDK_API_BASE_URL = "https://
|
|
2
|
+
export declare const SDK_API_BASE_URL = "https://sdk.api.scallop.io";
|
|
3
3
|
export declare const ADDRESSES_ID = "6462a088a7ace142bb6d7e9b";
|
|
4
4
|
export declare const PROTOCOL_OBJECT_ID = "0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf";
|
|
5
5
|
export declare const BORROW_FEE_PROTOCOL_ID = "0xc38f849e81cfe46d4e4320f508ea7dda42934a329d5a6571bb4c3cb6ea63f5da";
|
package/dist/index.js
CHANGED
|
@@ -64,7 +64,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
64
64
|
|
|
65
65
|
// src/constants/common.ts
|
|
66
66
|
var API_BASE_URL = "https://sui.api.scallop.io";
|
|
67
|
-
var SDK_API_BASE_URL = "https://
|
|
67
|
+
var SDK_API_BASE_URL = "https://sdk.api.scallop.io";
|
|
68
68
|
var ADDRESSES_ID = "6462a088a7ace142bb6d7e9b";
|
|
69
69
|
var PROTOCOL_OBJECT_ID = "0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf";
|
|
70
70
|
var BORROW_FEE_PROTOCOL_ID = "0xc38f849e81cfe46d4e4320f508ea7dda42934a329d5a6571bb4c3cb6ea63f5da";
|
|
@@ -2522,7 +2522,13 @@ var getObligationAccount = async (query, obligationId, ownerAddress, indexer = f
|
|
|
2522
2522
|
const requiredCollateralValue2 = depositedValue.multipliedBy(
|
|
2523
2523
|
marketCollateral.liquidationFactor
|
|
2524
2524
|
);
|
|
2525
|
-
const
|
|
2525
|
+
const poolSizeAmount = (0, import_bignumber3.default)(marketCollateral.maxDepositAmount).minus(
|
|
2526
|
+
marketCollateral.depositAmount
|
|
2527
|
+
);
|
|
2528
|
+
const availableDepositAmount = minBigNumber(
|
|
2529
|
+
(0, import_bignumber3.default)(coinAmount),
|
|
2530
|
+
poolSizeAmount
|
|
2531
|
+
);
|
|
2526
2532
|
const availableDepositCoin = availableDepositAmount.shiftedBy(
|
|
2527
2533
|
-1 * coinDecimal
|
|
2528
2534
|
);
|