diff --git a/src/common/ClientHelper.ts b/src/common/ClientHelper.ts index a0969ac24..8b8cb3b88 100644 --- a/src/common/ClientHelper.ts +++ b/src/common/ClientHelper.ts @@ -177,10 +177,7 @@ export async function constructSpokePoolClientsWithStartBlocks( // Explicitly set toBlocks for all chains so we can re-use them in other clients to make sure they all query // state to the same "latest" block per chain. - if (hubPoolClient.eventSearchConfig.toBlock === undefined) { - throw new Error("HubPoolClient eventSearchConfig.toBlock is undefined"); - } - const hubPoolBlock = await hubPoolClient.hubPool.provider.getBlock(hubPoolClient.eventSearchConfig.toBlock); + const hubPoolBlock = await hubPoolClient.hubPool.provider.getBlock(hubPoolClient.latestBlockSearched); const latestBlocksForChain: Record = Object.fromEntries( await Promise.all( enabledChains.map(async (chainId) => {