From 8c177efc3af26b24b626a7707e162c2fb18456bd Mon Sep 17 00:00:00 2001 From: palace22 Date: Fri, 15 Nov 2024 13:10:41 +0700 Subject: [PATCH] refactor: active pool epochs --- src/chains/evm/hub/modules/folks-hub-rewards.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/chains/evm/hub/modules/folks-hub-rewards.ts b/src/chains/evm/hub/modules/folks-hub-rewards.ts index e693951..3283f6d 100644 --- a/src/chains/evm/hub/modules/folks-hub-rewards.ts +++ b/src/chains/evm/hub/modules/folks-hub-rewards.ts @@ -45,11 +45,7 @@ import type { } from "viem"; function getActivePoolEpochs(activeEpochs: ActiveEpochs): Array { - const poolEpochs: Array = []; - for (const { poolId, epochIndex } of Object.values(activeEpochs)) { - poolEpochs.push({ poolId, epochIndex }); - } - return poolEpochs; + return Object.values(activeEpochs).map(({ poolId, epochIndex }) => ({ poolId, epochIndex })); } function getHistoricalPoolEpochs(historicalEpochs: Epochs, ignoreZeroTotalRewards = true): Array {