diff --git a/CHANGELOG.md b/CHANGELOG.md index 8afd46a09..e4ae83249 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- Fixed the missing currency conversion of the dividends on the analysis page - Fixed the missing error state in the watchlist - Fixed the missing loading indicator in the benchmarks of the markets overview diff --git a/apps/api/src/app/portfolio/portfolio.controller.ts b/apps/api/src/app/portfolio/portfolio.controller.ts index 3b34ae83e..b2dd8b69a 100644 --- a/apps/api/src/app/portfolio/portfolio.controller.ts +++ b/apps/api/src/app/portfolio/portfolio.controller.ts @@ -352,8 +352,7 @@ export class PortfolioController { let dividends = this.portfolioService.getDividends({ activities, - groupBy, - userCurrency + groupBy }); if ( diff --git a/apps/api/src/app/portfolio/portfolio.service.ts b/apps/api/src/app/portfolio/portfolio.service.ts index 2cbafc076..30eb53c59 100644 --- a/apps/api/src/app/portfolio/portfolio.service.ts +++ b/apps/api/src/app/portfolio/portfolio.service.ts @@ -358,21 +358,15 @@ export class PortfolioService { public getDividends({ activities, - groupBy, - userCurrency + groupBy }: { activities: Activity[]; groupBy?: GroupBy; - userCurrency: string; }): InvestmentItem[] { - let dividends = activities.map(({ currency, date, value }) => { + let dividends = activities.map(({ date, valueInBaseCurrency }) => { return { date: format(date, DATE_FORMAT), - investment: this.exchangeRateDataService.toCurrency( - value, - currency, - userCurrency - ) + investment: valueInBaseCurrency }; });