Skip to content

Commit

Permalink
fix: change get_farms to get_active_farms
Browse files Browse the repository at this point in the history
  • Loading branch information
Korniichuk Oleksandr authored and esaminu committed Jan 19, 2022
1 parent f8d501c commit 74e0202
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/frontend/src/redux/actions/staking.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ export const { staking } = createActions({
// TODO: will be used in order to calculate APY
const projectValidators = validators.filter(v => v.version === ValidatorVersion[PROJECT_VALIDATOR_VERSION]);
await Promise.all(projectValidators.map(async () => {
const allFarms = await projectValidators.contract.get_farms({ from_index: 0, limit: 1000 });
const allFarms = await projectValidators.contract.get_active_farms({ from_index: 0, limit: 1000 });
const allFarmsData = Promise.all(allFarms.map((_, index) => projectValidators.contract.get_farm({ farm_id: index })));
console.log('allFarmsData', allFarmsData);
}));
Expand Down

0 comments on commit 74e0202

Please sign in to comment.