Skip to content

Commit

Permalink
Merge pull request #535 from beethovenxfi/fix/beetswars-main
Browse files Browse the repository at this point in the history
fix: beetswars apr
  • Loading branch information
franzns authored Nov 20, 2023
2 parents 33b70b8 + 9e0c6e0 commit fe1be37
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ export class BeetswarsGaugeVotingAprService implements PoolAprService {

const response = await axios.get('https://www.beetswars.live/api/trpc/chart.chartdata');

const votingAprs: number[] = response.data.result.data.json.chartdata.votingApr;
const raw: number[] = response.data.result.data.json.chartdata.votingApr;

// Filter out non-numbers and infinity values
const votingAprs = raw.filter((apr) => apr && isFinite(apr));

const minApr = 0;
const maxApr = votingAprs[votingAprs.length - 1] / 100;
Expand Down

0 comments on commit fe1be37

Please sign in to comment.