Skip to content

Commit

Permalink
Add support for vaults on clm manager
Browse files Browse the repository at this point in the history
  • Loading branch information
prevostc committed Jul 18, 2024
1 parent 0499adf commit 1aa3a1a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/classic/lifecycle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1aa3a1a

Please sign in to comment.