Skip to content

Commit

Permalink
fix: dailyTotalRevenueETH should be parsed as a decimal number, not wei
Browse files Browse the repository at this point in the history
  • Loading branch information
jackmellis committed Dec 14, 2023
1 parent 2ad6090 commit 5d8e027
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/pools/fetchLiquidityPools/transformPool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@ const transformPool = (
// All other pools only get the AMM fees
} else {
dailyRevenue = pool.hourlySnapshots.reduce((total, snapshot) => {
return total + BigInt(snapshot.hourlyTotalRevenueETH ?? '0');
return total + parseEther(snapshot.hourlyTotalRevenueETH ?? '0');
}, Zero);
weeklyRevenue = pool.dailySnapshots.reduce((total, snapshot) => {
return total + BigInt(snapshot.dailyTotalRevenueETH ?? '0');
return total + parseEther(snapshot.dailyTotalRevenueETH ?? '0');
}, Zero);
}

Expand Down

0 comments on commit 5d8e027

Please sign in to comment.