Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
waynebruce0x committed May 11, 2022
1 parent 8d75f3d commit f4e3eb0
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const utils = require('../utils');
const farmsUrl = 'https://api-ui.harvest.finance/vaults?key=41e90ced-d559-4433-b390-af424fdc76d6';
const poolsUrl = 'https://api-ui.harvest.finance/pools?key=41e90ced-d559-4433-b390-af424fdc76d6';
const chains = {
"bsc": "bsc",
"bsc": "binance",
"eth": "ethereum",
"matic": "polygon"
};
Expand All @@ -19,20 +19,20 @@ async function apy() {
.filter(v => v.inactive != true);

const farms = activeFarms.map(v => ({
pool: v.vaultAddress,
pool: `${v.vaultAddress}-${v.id}`,
chain: utils.formatChain(chains[chain]),
project: 'harvest',
project: 'harvest-finance',
symbol: utils.formatSymbol(v.displayName),
tvlUsd: v.totalValueLocked,
apy: v.estimatedApy
tvlUsd: Number(v.totalValueLocked),
apy: Number(v.estimatedApy)
}));

const pools = poolsResponse[chain].map(p => ({
pool: p.contractAddress,
pool: `${p.contractAddress}-${p.id}`,
chain: utils.formatChain(chains[chain]),
project: 'harvest',
symbol: utils.formatSymbol(p.lpTokenData.symbol),
tvlUsd: p.totalValueLocked,
tvlUsd: Number(p.totalValueLocked),
apy: Number(p.tradingApy) + p.rewardAPY
.reduce((a,b) => Number(a) + Number(b), 0)
}));
Expand Down

0 comments on commit f4e3eb0

Please sign in to comment.