@scallop-io/sui-scallop-sdk 0.44.11 → 0.44.13
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/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/models/scallopClient.ts +3 -3
- package/src/queries/coreQuery.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -1261,7 +1261,7 @@ var queryMarket = async (query, indexer = false) => {
|
|
|
1261
1261
|
const parsedMarketCollateralData = parseOriginMarketCollateralData({
|
|
1262
1262
|
type: collateral.type,
|
|
1263
1263
|
collateralFactor: collateral.collateralFactor,
|
|
1264
|
-
liquidationFactor: collateral.
|
|
1264
|
+
liquidationFactor: collateral.liquidationFactor,
|
|
1265
1265
|
liquidationDiscount: collateral.liquidationDiscount,
|
|
1266
1266
|
liquidationPanelty: collateral.liquidationPanelty,
|
|
1267
1267
|
liquidationReserveFactor: collateral.liquidationReserveFactor,
|
|
@@ -4670,12 +4670,12 @@ var ScallopClient = class {
|
|
|
4670
4670
|
const sender = walletAddress || this.walletAddress;
|
|
4671
4671
|
txBlock.setSender(sender);
|
|
4672
4672
|
const obligations = await this.query.getObligations(sender);
|
|
4673
|
-
const
|
|
4674
|
-
if (
|
|
4673
|
+
const specificObligationId = obligationId || obligations?.[0]?.id;
|
|
4674
|
+
if (specificObligationId) {
|
|
4675
4675
|
await txBlock.addCollateralQuick(
|
|
4676
4676
|
amount,
|
|
4677
4677
|
collateralCoinName,
|
|
4678
|
-
|
|
4678
|
+
specificObligationId
|
|
4679
4679
|
);
|
|
4680
4680
|
} else {
|
|
4681
4681
|
const [obligation, obligationKey, hotPotato] = txBlock.openObligation();
|