@interest-protocol/vortex-sdk 11.2.0 → 11.3.0

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
@@ -39651,6 +39651,7 @@ class VortexAPI {
39651
39651
  return response;
39652
39652
  }
39653
39653
  async getAllCommitments(args) {
39654
+ const sleepMs = Math.max(args.sleepMs ?? 200, 200);
39654
39655
  const allCommitments = [];
39655
39656
  let page = 1;
39656
39657
  let hasNext = true;
@@ -39659,6 +39660,9 @@ class VortexAPI {
39659
39660
  allCommitments.push(...response.data.items);
39660
39661
  hasNext = response.data.pagination.hasNext;
39661
39662
  page++;
39663
+ if (hasNext) {
39664
+ await new Promise((resolve) => setTimeout(resolve, sleepMs));
39665
+ }
39662
39666
  }
39663
39667
  return allCommitments;
39664
39668
  }