From 6711a156f643784a8bd3e1833eebfd4939c0aeb7 Mon Sep 17 00:00:00 2001 From: "James Morris, MS" <96435344+james-a-morris@users.noreply.github.com> Date: Sat, 9 Mar 2024 10:21:38 -0500 Subject: [PATCH] nit(hubpool): use language feature in update() (#582) --- src/clients/HubPoolClient.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/clients/HubPoolClient.ts b/src/clients/HubPoolClient.ts index e648407ac..61cafe0f2 100644 --- a/src/clients/HubPoolClient.ts +++ b/src/clients/HubPoolClient.ts @@ -799,13 +799,12 @@ export class HubPoolClient extends BaseAbstractClient { }; } - async update(eventsToQuery?: HubPoolEvent[]): Promise { + async update( + eventsToQuery: HubPoolEvent[] = Object.keys(this.hubPoolEventFilters()) as HubPoolEvent[] + ): Promise { if (!this.configStoreClient.isUpdated) { throw new Error("ConfigStoreClient not updated"); } - - eventsToQuery = eventsToQuery ?? (Object.keys(this.hubPoolEventFilters()) as HubPoolEvent[]); // Query all events by default. - const update = await this._update(eventsToQuery); if (!update.success) { // This failure only occurs if the RPC searchConfig is miscomputed, and has only been seen in the hardhat test