From 31e234610194fe62e1dd3d800310b0f958afe0ca Mon Sep 17 00:00:00 2001 From: vitalymatyushik Date: Sat, 25 Oct 2025 10:37:57 +0200 Subject: [PATCH] Bugfix/market price in base currency during the portfolio snapshot calculation (#5828) * Add fallback for market price in base currency * Update changelog --- CHANGELOG.md | 4 ++++ apps/api/src/app/portfolio/calculator/portfolio-calculator.ts | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa7dcb97c..5f49760b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed the style in the footer row of the accounts table - Fixed the rendering of names and symbols for custom assets in the import activities dialog +### Fixed + +- Fixed an issue with the market price in base currency during the portfolio snapshot calculation + ## 2.210.1 - 2025-10-22 ### Added diff --git a/apps/api/src/app/portfolio/calculator/portfolio-calculator.ts b/apps/api/src/app/portfolio/calculator/portfolio-calculator.ts index 3218d01f4..10e5c15cb 100644 --- a/apps/api/src/app/portfolio/calculator/portfolio-calculator.ts +++ b/apps/api/src/app/portfolio/calculator/portfolio-calculator.ts @@ -336,7 +336,7 @@ export abstract class PortfolioCalculator { ).mul( exchangeRatesByCurrency[`${item.currency}${this.currency}`]?.[ endDateString - ] + ] ?? 1 ); const {