@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.js CHANGED
@@ -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 tarketObligationId = obligationId || obligations[0].id;
4674
- if (tarketObligationId) {
4673
+ const specificObligationId = obligationId || obligations?.[0]?.id;
4674
+ if (specificObligationId) {
4675
4675
  await txBlock.addCollateralQuick(
4676
4676
  amount,
4677
4677
  collateralCoinName,
4678
- tarketObligationId
4678
+ specificObligationId
4679
4679
  );
4680
4680
  } else {
4681
4681
  const [obligation, obligationKey, hotPotato] = txBlock.openObligation();