Skip to content

Commit

Permalink
Merge pull request #571 from balancer/quick-fix
Browse files Browse the repository at this point in the history
limit events query result set to 1000 records
  • Loading branch information
gmbronco authored Jul 10, 2024
2 parents ea9bb4d + cbea2e0 commit fecbcc0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/friendly-scissors-visit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'backend': patch
---

limiting events query results set to 1000 records
2 changes: 1 addition & 1 deletion modules/controllers/pool-events-query-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export function EventsQueryController(tracer?: any) {
where,
}: QueryPoolEventsArgs): Promise<(GqlPoolSwapEventV3 | GqlPoolAddRemoveEventV3)[]> => {
// Setting default values
first = first ?? 1000;
first = Math.min(1000, first ?? 1000); // Limiting to 1000 items
skip = skip ?? 0;
let { chainIn, poolIdIn, userAddress, typeIn, range } = where || {};

Expand Down

0 comments on commit fecbcc0

Please sign in to comment.