From bd2da286314b977cb20b28837f0ca7fb4bca1011 Mon Sep 17 00:00:00 2001 From: gmbronco <83549293+gmbronco@users.noreply.github.com> Date: Fri, 8 Mar 2024 18:48:54 +0100 Subject: [PATCH] removed duplicated action --- modules/controllers/jobs-controller.ts | 30 -------------------------- 1 file changed, 30 deletions(-) diff --git a/modules/controllers/jobs-controller.ts b/modules/controllers/jobs-controller.ts index f22b8f2c1..c59a1019b 100644 --- a/modules/controllers/jobs-controller.ts +++ b/modules/controllers/jobs-controller.ts @@ -160,36 +160,6 @@ export function JobsController(tracer?: any) { } return syncPools(ids, viemClient, vaultAddress, chain, latestBlock + 1n); }, - /** - * Updates database pools with the subgraph and onchain state. - * Usually used only when database schema changes and new data needs to be added to the pools. - * Most likely used only together with migrations. - * Alternatively, it can be run as a new pools job, because it can be slow then. - * - * @param chainId - */ - async updatePools(chainId: string) { - const chain = chainIdToChain[chainId]; - const { - subgraphs: { balancerV3, balancerPoolsV3 }, - balancer: { - v3: { vaultAddress }, - }, - } = config[chain]; - - // Guard against unconfigured chains - if (!balancerV3 || !balancerPoolsV3 || !vaultAddress) { - throw new Error(`Chain not configured: ${chain}`); - } - - const client = getV3JoinedSubgraphClient(balancerV3, balancerPoolsV3); - const allPools = await client.getAllInitializedPools(); - - const viemClient = getViemClient(chain); - const latestBlock = await viemClient.getBlockNumber(); - - await upsertPools(allPools, viemClient, vaultAddress, chain, latestBlock); - }, async syncSwapsV3(chainId: string) { const chain = chainIdToChain[chainId]; const {