From ff20ff9fda3fd422a7b5baa0193ce49d4f62476e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Pr=C3=A9vost?= <998369+prevostc@users.noreply.github.com> Date: Wed, 25 Sep 2024 12:02:08 +0200 Subject: [PATCH] Fix RP reward token --- src/reward-pool/lifecycle.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/reward-pool/lifecycle.ts b/src/reward-pool/lifecycle.ts index 58358ff..db08043 100644 --- a/src/reward-pool/lifecycle.ts +++ b/src/reward-pool/lifecycle.ts @@ -161,11 +161,12 @@ export function handleClmRewardPoolAddReward(event: RewardPoolAddRewardEvent): v const rewardPool = getClmRewardPool(rewardPoolAddress) const clm = getCLM(rewardPool.clm) + const rewardToken = fetchAndSaveTokenData(event.params.reward) const rewardTokens = clm.rewardTokens const rewardTokensOrder = clm.rewardTokensOrder - rewardTokens.push(event.params.reward) - rewardTokensOrder.push(event.params.reward) + rewardTokens.push(rewardToken.id) + rewardTokensOrder.push(rewardToken.id) clm.rewardTokens = rewardTokens clm.rewardTokensOrder = rewardTokensOrder clm.save()