From e14793c6980d1b9636ab6bad4c5ee80f7ffc331e Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sat, 15 Aug 2026 13:58:34 +0200 Subject: [PATCH] Bugfix/dividend values in base currency (#7633) * Fix missing currency conversion of dividends * Update changelog --- CHANGELOG.md | 4 ++++ apps/api/src/app/portfolio/portfolio.controller.ts | 3 +-- apps/api/src/app/portfolio/portfolio.service.ts | 12 +++--------- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 00bcc5498..7419b9db5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Extended the `GET api/v1/access` endpoint by the scopes - Extended the `GET api/v1/user` endpoint by the scopes +### Fixed + +- Fixed the missing currency conversion of the dividends on the analysis page + ## 3.51.0 - 2026-08-14 ### Changed 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 }; });