Skip to content

Commit

Permalink
Change fees in cashflows chart (#2365)
Browse files Browse the repository at this point in the history
  • Loading branch information
hieronx committed Aug 12, 2024
1 parent da839c7 commit ae9e26d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions centrifuge-app/src/components/Charts/CashflowsChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ export const CashflowsChart = ({ poolStates, pool }: Props) => {
pool.currency.decimals
).toFloat()

const interest = new CurrencyBalance(day.sumInterestRepaidAmountByPeriod, pool.currency.decimals).toFloat()
const fees =
new CurrencyBalance(day.sumPoolFeesChargedAmountByPeriod ?? 0, pool.currency.decimals).toFloat() +
new CurrencyBalance(day.sumPoolFeesAccruedAmountByPeriod ?? 0, pool.currency.decimals).toFloat()
const interest =
new CurrencyBalance(day.sumInterestRepaidAmountByPeriod, pool.currency.decimals).toFloat() +
new CurrencyBalance(day.sumUnscheduledRepaidAmountByPeriod, pool.currency.decimals).toFloat()
const fees = new CurrencyBalance(day.sumPoolFeesPaidAmountByPeriod ?? 0, pool.currency.decimals).toFloat()
return { name: new Date(day.timestamp), purchases, principalRepayments, interest, fees }
}) || [],
[poolStates, pool.currency.decimals]
Expand Down

0 comments on commit ae9e26d

Please sign in to comment.