diff --git a/src/clm/lifecycle.ts b/src/clm/lifecycle.ts index 52fa456..23e4390 100644 --- a/src/clm/lifecycle.ts +++ b/src/clm/lifecycle.ts @@ -269,8 +269,12 @@ export function handleRewardPoolInitialized(event: RewardPoolInitialized): void const rewardPoolToken = fetchAndSaveTokenData(rewardPoolAddress) const clm = getCLM(managerAddress) - clm.rewardPoolTokens.push(rewardPoolToken.id) - clm.rewardPoolsTotalSupply.push(ZERO_BI) + const rewardPoolTokens = clm.rewardPoolTokens + rewardPoolTokens.push(rewardPoolToken.id) + clm.rewardPoolTokens = rewardPoolTokens + const rewardPoolsTotalSupply = clm.rewardPoolsTotalSupply + rewardPoolsTotalSupply.push(ZERO_BI) + clm.rewardPoolsTotalSupply = rewardPoolsTotalSupply clm.save() log.info("handleRewardPoolInitialized: Reward pool {} initialized for CLM {} on block {}", [ diff --git a/src/clm/utils/clm-data.ts b/src/clm/utils/clm-data.ts index 4329a08..582c172 100644 --- a/src/clm/utils/clm-data.ts +++ b/src/clm/utils/clm-data.ts @@ -259,7 +259,7 @@ export function fetchCLMData(clm: CLM): CLMData { throw new Error("Unsupported price oracle type") } } else { - log.error("Failed to fetch nativeToUSDPrice for CLM {}", [clm.id.toString()]) + log.error("Failed to fetch nativeToUSDPrice for CLM {}", [clm.id.toHexString()]) } // only some clms have a reward pool token