From 1aa3a1a3cbf12b1cc332805a6d926258f054e589 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Pr=C3=A9vost?= <998369+prevostc@users.noreply.github.com> Date: Thu, 18 Jul 2024 23:56:01 +0200 Subject: [PATCH] Add support for vaults on clm manager --- src/classic/lifecycle.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/classic/lifecycle.ts b/src/classic/lifecycle.ts index e58f58a..604e34b 100644 --- a/src/classic/lifecycle.ts +++ b/src/classic/lifecycle.ts @@ -33,7 +33,7 @@ import { getTransaction } from "../common/entity/transaction" import { fetchAndSaveTokenData } from "../common/utils/token" import { PRODUCT_LIFECYCLE_PAUSED, PRODUCT_LIFECYCLE_RUNNING } from "../common/entity/lifecycle" import { ADDRESS_ZERO } from "../common/utils/address" -import { isClmRewardPool } from "../clm/entity/clm" +import { isClmManager, isClmRewardPool } from "../clm/entity/clm" export function handleClassicVaultOrStrategyCreated(event: VaultOrStrategyCreated): void { const address = event.params.proxy @@ -151,7 +151,8 @@ function fetchInitialClassicDataAndSave(classic: Classic): void { } const underlyingTokenAddress = underlyingTokenAddressRes.value - if (!isClmRewardPool(underlyingTokenAddress)) { + const isClmUnderlying = isClmRewardPool(underlyingTokenAddress) || isClmManager(underlyingTokenAddress) + if (!isClmUnderlying) { log.error("Underlying token address is not related to clm: {}", [underlyingTokenAddress.toHexString()]) removeClassicAndDependencies(classic) return