@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/package.json
CHANGED
|
@@ -253,12 +253,12 @@ export class ScallopClient {
|
|
|
253
253
|
txBlock.setSender(sender);
|
|
254
254
|
|
|
255
255
|
const obligations = await this.query.getObligations(sender);
|
|
256
|
-
const
|
|
257
|
-
if (
|
|
256
|
+
const specificObligationId = obligationId || obligations?.[0]?.id;
|
|
257
|
+
if (specificObligationId) {
|
|
258
258
|
await txBlock.addCollateralQuick(
|
|
259
259
|
amount,
|
|
260
260
|
collateralCoinName,
|
|
261
|
-
|
|
261
|
+
specificObligationId
|
|
262
262
|
);
|
|
263
263
|
} else {
|
|
264
264
|
const [obligation, obligationKey, hotPotato] = txBlock.openObligation();
|
package/src/queries/coreQuery.ts
CHANGED
|
@@ -154,7 +154,7 @@ export const queryMarket = async (
|
|
|
154
154
|
const parsedMarketCollateralData = parseOriginMarketCollateralData({
|
|
155
155
|
type: collateral.type,
|
|
156
156
|
collateralFactor: collateral.collateralFactor,
|
|
157
|
-
liquidationFactor: collateral.
|
|
157
|
+
liquidationFactor: collateral.liquidationFactor,
|
|
158
158
|
liquidationDiscount: collateral.liquidationDiscount,
|
|
159
159
|
liquidationPanelty: collateral.liquidationPanelty,
|
|
160
160
|
liquidationReserveFactor: collateral.liquidationReserveFactor,
|