@gearbox-protocol/sdk 7.6.3 → 7.6.4

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.
@@ -46,7 +46,15 @@ async function getLogsPaginated(client, params) {
46
46
  )
47
47
  )
48
48
  );
49
- return responses.flat();
49
+ return responses.flat().sort((a, b) => {
50
+ if (a.blockNumber === b.blockNumber) {
51
+ return a.logIndex - b.logIndex;
52
+ } else if (a.blockNumber < b.blockNumber) {
53
+ return -1;
54
+ } else {
55
+ return 1;
56
+ }
57
+ });
50
58
  }
51
59
  // Annotate the CommonJS export names for ESM import in node:
52
60
  0 && (module.exports = {
@@ -23,7 +23,15 @@ async function getLogsPaginated(client, params) {
23
23
  )
24
24
  )
25
25
  );
26
- return responses.flat();
26
+ return responses.flat().sort((a, b) => {
27
+ if (a.blockNumber === b.blockNumber) {
28
+ return a.logIndex - b.logIndex;
29
+ } else if (a.blockNumber < b.blockNumber) {
30
+ return -1;
31
+ } else {
32
+ return 1;
33
+ }
34
+ });
27
35
  }
28
36
  export {
29
37
  getLogsPaginated
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "7.6.3",
3
+ "version": "7.6.4",
4
4
  "description": "Gearbox SDK",
5
5
  "license": "MIT",
6
6
  "main": "./dist/cjs/sdk/index.js",