From cc236b7cca24701c3be189c0dfc71cd955f458ee Mon Sep 17 00:00:00 2001 From: james-a-morris Date: Wed, 11 Oct 2023 13:50:35 -0400 Subject: [PATCH] chore: revert change for another PR --- src/utils/BlockUtils.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/utils/BlockUtils.ts b/src/utils/BlockUtils.ts index 51b2a1405b..c0cffa9a9e 100644 --- a/src/utils/BlockUtils.ts +++ b/src/utils/BlockUtils.ts @@ -1,7 +1,7 @@ -import { getProvider, getRedis, isDefined, setRedisKey, shouldCache } from "./"; -import { utils as sdkUtils } from "@across-protocol/sdk-v2"; +import { BlockFinder } from "@uma/financial-templates-lib"; +import { Block, getProvider, getRedis, isDefined, setRedisKey, shouldCache } from "./"; -const blockFinders: { [chainId: number]: sdkUtils.BlockFinder } = {}; +const blockFinders: { [chainId: number]: BlockFinder } = {}; /** * @notice Return block finder for chain. Loads from in memory blockFinder cache if this function was called before @@ -9,10 +9,10 @@ const blockFinders: { [chainId: number]: sdkUtils.BlockFinder } = {}; * @param chainId * @returns */ -export async function getBlockFinder(chainId: number): Promise { +export async function getBlockFinder(chainId: number): Promise> { if (!isDefined(blockFinders[chainId])) { const providerForChain = await getProvider(chainId); - blockFinders[chainId] = new sdkUtils.BlockFinder(providerForChain); + blockFinders[chainId] = new BlockFinder(providerForChain.getBlock.bind(providerForChain), [], chainId); } return blockFinders[chainId]; } @@ -29,7 +29,7 @@ export async function getBlockFinder(chainId: number): Promise ): Promise { blockFinder ??= await getBlockFinder(chainId); const redisClient = await getRedis();