Skip to content

Commit

Permalink
refactor: active pool epochs
Browse files Browse the repository at this point in the history
  • Loading branch information
palace22 committed Nov 15, 2024
1 parent c06e160 commit 8c177ef
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/chains/evm/hub/modules/folks-hub-rewards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,7 @@ import type {
} from "viem";

function getActivePoolEpochs(activeEpochs: ActiveEpochs): Array<PoolEpoch> {
const poolEpochs: Array<PoolEpoch> = [];
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<PoolEpoch> {
Expand Down

0 comments on commit 8c177ef

Please sign in to comment.