Skip to content

Commit

Permalink
nit(hubpool): use language feature in update() (#582)
Browse files Browse the repository at this point in the history
  • Loading branch information
james-a-morris authored Mar 9, 2024
1 parent 66c329b commit 6711a15
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/clients/HubPoolClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -799,13 +799,12 @@ export class HubPoolClient extends BaseAbstractClient {
};
}

async update(eventsToQuery?: HubPoolEvent[]): Promise<void> {
async update(
eventsToQuery: HubPoolEvent[] = Object.keys(this.hubPoolEventFilters()) as HubPoolEvent[]
): Promise<void> {
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
Expand Down

0 comments on commit 6711a15

Please sign in to comment.