From 69c59e80e80902d977594fd6ed0fbbe70d382b95 Mon Sep 17 00:00:00 2001 From: 0xthrpw <0xthrpw@gmail.com> Date: Thu, 17 Oct 2024 22:03:00 -0400 Subject: [PATCH] boolish --- environment.d.ts | 2 +- src/pubsub/publisher/contract-event-publisher.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/environment.d.ts b/environment.d.ts index ef8f3b7..6db50c1 100644 --- a/environment.d.ts +++ b/environment.d.ts @@ -23,7 +23,7 @@ interface EnvironmentVariables { readonly SNITCH_ID: string readonly START_BLOCK: string readonly BATCH_SIZE: number - readonly RECOVER_HISTORY: boolean + readonly RECOVER_HISTORY: string } declare module 'bun' { diff --git a/src/pubsub/publisher/contract-event-publisher.ts b/src/pubsub/publisher/contract-event-publisher.ts index a7c58bb..3e7d611 100644 --- a/src/pubsub/publisher/contract-event-publisher.ts +++ b/src/pubsub/publisher/contract-event-publisher.ts @@ -132,7 +132,7 @@ export class ContractEventPublisher implements EventPublisher { * It sets up a listener for contract events and dispatches them to all subscribers. */ async start(): Promise { - if (!!env.RECOVER_HISTORY) { + if (env.RECOVER_HISTORY === 'true') { // Fetch and process historical events const latestBlock = await this.client.getBlockNumber() const batchSize = 10000n