@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.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -0
- package/dist/index.mjs.map +1 -1
- package/dist/vortex-api.d.ts +3 -1
- package/dist/vortex-api.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/vortex-api.ts +6 -1
package/dist/index.js
CHANGED
|
@@ -39653,6 +39653,7 @@ class VortexAPI {
|
|
|
39653
39653
|
return response;
|
|
39654
39654
|
}
|
|
39655
39655
|
async getAllCommitments(args) {
|
|
39656
|
+
const sleepMs = Math.max(args.sleepMs ?? 200, 200);
|
|
39656
39657
|
const allCommitments = [];
|
|
39657
39658
|
let page = 1;
|
|
39658
39659
|
let hasNext = true;
|
|
@@ -39661,6 +39662,9 @@ class VortexAPI {
|
|
|
39661
39662
|
allCommitments.push(...response.data.items);
|
|
39662
39663
|
hasNext = response.data.pagination.hasNext;
|
|
39663
39664
|
page++;
|
|
39665
|
+
if (hasNext) {
|
|
39666
|
+
await new Promise((resolve) => setTimeout(resolve, sleepMs));
|
|
39667
|
+
}
|
|
39664
39668
|
}
|
|
39665
39669
|
return allCommitments;
|
|
39666
39670
|
}
|