From 14ead742829fee2eadb13d0ecf0a100db527f4d9 Mon Sep 17 00:00:00 2001 From: gmbronco <83549293+gmbronco@users.noreply.github.com> Date: Fri, 30 Aug 2024 16:19:50 +0200 Subject: [PATCH] use index when querying events by userAddress --- .changeset/chilly-jars-sort.md | 5 +++++ modules/controllers/event-query-controller.ts | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 .changeset/chilly-jars-sort.md diff --git a/.changeset/chilly-jars-sort.md b/.changeset/chilly-jars-sort.md new file mode 100644 index 000000000..f9aa4bf8a --- /dev/null +++ b/.changeset/chilly-jars-sort.md @@ -0,0 +1,5 @@ +--- +'backend': patch +--- + +use index when querying events by userAddress diff --git a/modules/controllers/event-query-controller.ts b/modules/controllers/event-query-controller.ts index b4a390d22..b0b0dc07d 100644 --- a/modules/controllers/event-query-controller.ts +++ b/modules/controllers/event-query-controller.ts @@ -124,8 +124,7 @@ export function EventsQueryController(tracer?: any) { if (userAddress) { conditions.userAddress = { - equals: userAddress, - mode: 'insensitive', + equals: userAddress.toLowerCase(), }; }