@scallop-io/sui-scallop-sdk 0.44.11 → 0.44.12

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.mjs CHANGED
@@ -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 tarketObligationId = obligationId || obligations[0].id;
4613
- if (tarketObligationId) {
4612
+ const specificObligationId = obligationId || obligations?.[0]?.id;
4613
+ if (specificObligationId) {
4614
4614
  await txBlock.addCollateralQuick(
4615
4615
  amount,
4616
4616
  collateralCoinName,
4617
- tarketObligationId
4617
+ specificObligationId
4618
4618
  );
4619
4619
  } else {
4620
4620
  const [obligation, obligationKey, hotPotato] = txBlock.openObligation();