Skip to content

Commit

Permalink
fix(apps/earn): charts - swapFee
Browse files Browse the repository at this point in the history
  • Loading branch information
LufyCZ committed May 28, 2023
1 parent 3d9906d commit cb57718
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/earn/components/PoolPageV3.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ const Pool: FC = () => {
<PoolChart
isLoading={isGraphDataLoading}
data={graphData}
swapFee={pool?.fee}
swapFee={pool?.fee ? pool.fee / 1000000 : pool?.fee}
charts={['Volume', 'TVL', 'Fees']}
/>
<div className="flex flex-col gap-6">
Expand Down
4 changes: 3 additions & 1 deletion apps/earn/components/PoolSection/PoolChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const PoolChart: FC<PoolChartProps> = ({ swapFee, data: graphPair, isLoad
if (cur.date * 1000 >= currentDate - chartTimespans[chartPeriod]) {
acc[0].push(cur.date)
if (chartType === PoolChartType.Fees) {
acc[1].push(Number(cur.volumeUSD * (Number(swapFee) * 100)))
acc[1].push(Number(cur.volumeUSD * Number(swapFee)))
} else if (chartType === PoolChartType.Volume) {
acc[1].push(Number(cur.volumeUSD))
} else if (chartType === PoolChartType.TVL) {
Expand Down Expand Up @@ -230,6 +230,8 @@ export const PoolChart: FC<PoolChartProps> = ({ swapFee, data: graphPair, isLoad
: chartList
}, [charts])

console.log(graphPair)

return (
<div className="flex flex-col gap-6">
<div className="flex flex-col items-center justify-between gap-5 md:flex-row">
Expand Down

0 comments on commit cb57718

Please sign in to comment.