@scallop-io/sui-scallop-sdk 0.44.26 → 0.44.27

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
@@ -4862,10 +4862,13 @@ var requireObligationInfo2 = async (...params) => {
4862
4862
  if (obligations.length === 0) {
4863
4863
  throw new Error(`No obligation found for sender ${sender}`);
4864
4864
  }
4865
+ const selectedObligation = obligations.find(
4866
+ (obligation) => obligation.id === obligationId || obligation.keyId === obligationKey
4867
+ ) ?? obligations[0];
4865
4868
  return {
4866
- obligationId: obligations[0].id,
4867
- obligationKey: obligations[0].keyId,
4868
- obligationLocked: obligations[0].locked
4869
+ obligationId: selectedObligation.id,
4870
+ obligationKey: selectedObligation.keyId,
4871
+ obligationLocked: selectedObligation.locked
4869
4872
  };
4870
4873
  };
4871
4874
  var getBindedObligationId = async (builder, veScaKey) => {