@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.mjs
CHANGED
|
@@ -1197,7 +1197,7 @@ var queryMarket = async (query, indexer = false) => {
|
|
|
1197
1197
|
const parsedMarketCollateralData = parseOriginMarketCollateralData({
|
|
1198
1198
|
type: collateral.type,
|
|
1199
1199
|
collateralFactor: collateral.collateralFactor,
|
|
1200
|
-
liquidationFactor: collateral.
|
|
1200
|
+
liquidationFactor: collateral.liquidationFactor,
|
|
1201
1201
|
liquidationDiscount: collateral.liquidationDiscount,
|
|
1202
1202
|
liquidationPanelty: collateral.liquidationPanelty,
|
|
1203
1203
|
liquidationReserveFactor: collateral.liquidationReserveFactor,
|
|
@@ -4609,12 +4609,12 @@ var ScallopClient = class {
|
|
|
4609
4609
|
const sender = walletAddress || this.walletAddress;
|
|
4610
4610
|
txBlock.setSender(sender);
|
|
4611
4611
|
const obligations = await this.query.getObligations(sender);
|
|
4612
|
-
const
|
|
4613
|
-
if (
|
|
4612
|
+
const specificObligationId = obligationId || obligations?.[0]?.id;
|
|
4613
|
+
if (specificObligationId) {
|
|
4614
4614
|
await txBlock.addCollateralQuick(
|
|
4615
4615
|
amount,
|
|
4616
4616
|
collateralCoinName,
|
|
4617
|
-
|
|
4617
|
+
specificObligationId
|
|
4618
4618
|
);
|
|
4619
4619
|
} else {
|
|
4620
4620
|
const [obligation, obligationKey, hotPotato] = txBlock.openObligation();
|