From 38aff32a02b8734460825348ea346b897b41fff1 Mon Sep 17 00:00:00 2001 From: 0xkenj1 Date: Wed, 23 Oct 2024 13:50:37 -0300 Subject: [PATCH] fix: protocolEvent --- .../test/registry/handlers/roleGranted.handler.spec.ts | 4 ++-- packages/shared/src/types/events/common.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/processors/test/registry/handlers/roleGranted.handler.spec.ts b/packages/processors/test/registry/handlers/roleGranted.handler.spec.ts index 30f460a..030ac33 100644 --- a/packages/processors/test/registry/handlers/roleGranted.handler.spec.ts +++ b/packages/processors/test/registry/handlers/roleGranted.handler.spec.ts @@ -24,7 +24,7 @@ describe("RoleGrantedHandler", () => { const blockNumber = 123456; // Example blockNumber const mockedAccount = "0x48f33AE41E1762e1688125C4f1C536B1491dF803"; const mockedSender = "0xc0969723D577D31aB4bdF7e53C540c11298c56AF"; - const mockedEvent: ProtocolEvent<"Registry", "RoleGranted"> = { + const mockedEvent = { blockTimestamp: 123123123, chainId: 10, contractName: "Registry", @@ -41,7 +41,7 @@ describe("RoleGrantedHandler", () => { hash: "0x123", transactionIndex: 1, }, - }; + } as ProtocolEvent<"Registry", "RoleGranted">; it("returns an empty array if role is ALLO_OWNER_ROLE", async () => { const event = mockedEvent; diff --git a/packages/shared/src/types/events/common.ts b/packages/shared/src/types/events/common.ts index 1dcc640..005cd5b 100644 --- a/packages/shared/src/types/events/common.ts +++ b/packages/shared/src/types/events/common.ts @@ -66,8 +66,8 @@ export type ProtocolEvent - : Record); + : object + : object); /** * TODO: This type is currently only used in the EventsFetcher and IndexerClient.