Browse Source

Merge branch 'main' into bugfix/missing-loading-indicator-in-benchmarks-table-on-markets-page

pull/7634/head
Thomas Kaul 2 weeks ago
committed by GitHub
parent
commit
931bdbc574
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 3
      apps/api/src/app/portfolio/portfolio.controller.ts
  3. 12
      apps/api/src/app/portfolio/portfolio.service.ts

1
CHANGELOG.md

@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed ### Fixed
- Fixed the missing currency conversion of the dividends on the analysis page
- Fixed the missing error state in the watchlist - Fixed the missing error state in the watchlist
- Fixed the missing loading indicator in the benchmarks of the markets overview - Fixed the missing loading indicator in the benchmarks of the markets overview

3
apps/api/src/app/portfolio/portfolio.controller.ts

@ -352,8 +352,7 @@ export class PortfolioController {
let dividends = this.portfolioService.getDividends({ let dividends = this.portfolioService.getDividends({
activities, activities,
groupBy, groupBy
userCurrency
}); });
if ( if (

12
apps/api/src/app/portfolio/portfolio.service.ts

@ -358,21 +358,15 @@ export class PortfolioService {
public getDividends({ public getDividends({
activities, activities,
groupBy, groupBy
userCurrency
}: { }: {
activities: Activity[]; activities: Activity[];
groupBy?: GroupBy; groupBy?: GroupBy;
userCurrency: string;
}): InvestmentItem[] { }): InvestmentItem[] {
let dividends = activities.map(({ currency, date, value }) => { let dividends = activities.map(({ date, valueInBaseCurrency }) => {
return { return {
date: format(date, DATE_FORMAT), date: format(date, DATE_FORMAT),
investment: this.exchangeRateDataService.toCurrency( investment: valueInBaseCurrency
value,
currency,
userCurrency
)
}; };
}); });

Loading…
Cancel
Save