Skip to content

Commit

Permalink
fix not found price
Browse files Browse the repository at this point in the history
  • Loading branch information
dtmkeng committed Oct 23, 2023
1 parent d3ed3b0 commit 6bb0a71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fees/crv-usd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const fetchFees = (chain: Chain) => {
.map((a: any) => a.output).flat();
const crvUSDAddress = `${CHAIN.ETHEREUM}:0xf939E0A03FB07F59A73314E73794Be0E57ac1b4E`
const prices = await getPrices([crvUSDAddress], timestamp);
const crvUSDPrice = prices[crvUSDAddress].price;
const crvUSDPrice = prices[crvUSDAddress]?.price || 1;
const dailyFees = logs.reduce((acc: number, log: ILog) => {
const data = log.data.replace('0x', '');
const fee = (Number('0x' + data.slice(0, 64)) / 1e18) * crvUSDPrice;
Expand Down

0 comments on commit 6bb0a71

Please sign in to comment.