diff --git a/src/state/farms/elasticv2/updater.tsx b/src/state/farms/elasticv2/updater.tsx index 87c6a14ef7..8eab30a27d 100644 --- a/src/state/farms/elasticv2/updater.tsx +++ b/src/state/farms/elasticv2/updater.tsx @@ -170,9 +170,9 @@ export default function ElasticFarmV2Updater({ interval = true }: { interval?: b const prices = await fetchPrices(tokens) const formattedData: ElasticFarmV2[] = data.farmV2S.map((farm: SubgraphFarmV2) => { - const getToken = (t: SubgraphToken) => { + const getToken = (t: SubgraphToken, keepWrapped = false) => { const address = isAddressString(chainId, t.id) - return address === WETH[chainId].address || address === ZERO_ADDRESS + return (keepWrapped ? false : address === WETH[chainId].address) || address === ZERO_ADDRESS ? NativeCurrencies[chainId] : new Token( chainId, @@ -211,7 +211,9 @@ export default function ElasticFarmV2Updater({ interval = true }: { interval?: b Number(tvlToken0.toExact() || '0') * (prices[farm.pool.token0.id] || 0) + Number(tvlToken1.toExact() || '0') * (prices[farm.pool.token1.id] || 0) - const totalRewards = farm.rewards.map(item => CurrencyAmount.fromRawAmount(getToken(item.token), item.amount)) + const totalRewards = farm.rewards.map(item => + CurrencyAmount.fromRawAmount(getToken(item.token, true), item.amount), + ) return { id: farm.id,