Browse Source

Bugfix/fix exception in portfolio calculator (#4113)

* Fix exception in portfolio calculator

* Update changelog
pull/4114/head
Thomas Kaul 1 month ago
committed by GitHub
parent
commit
0841f8bd5b
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      CHANGELOG.md
  2. 1
      apps/api/src/app/portfolio/calculator/twr/portfolio-calculator.ts
  3. 2
      libs/common/src/lib/models/portfolio-snapshot.ts

4
CHANGELOG.md

@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Extended the _X-ray_ page by a summary - Extended the _X-ray_ page by a summary
### Fixed
- Fixed an exception in the caching of the portfolio snapshot in the portfolio calculator
## 2.126.1 - 2024-12-07 ## 2.126.1 - 2024-12-07
### Added ### Added

1
apps/api/src/app/portfolio/calculator/twr/portfolio-calculator.ts

@ -101,6 +101,7 @@ export class TWRPortfolioCalculator extends PortfolioCalculator {
totalInterestWithCurrencyEffect, totalInterestWithCurrencyEffect,
totalInvestment, totalInvestment,
totalInvestmentWithCurrencyEffect, totalInvestmentWithCurrencyEffect,
errors: [],
historicalData: [], historicalData: [],
totalLiabilitiesWithCurrencyEffect: new Big(0), totalLiabilitiesWithCurrencyEffect: new Big(0),
totalValuablesWithCurrencyEffect: new Big(0) totalValuablesWithCurrencyEffect: new Big(0)

2
libs/common/src/lib/models/portfolio-snapshot.ts

@ -13,7 +13,7 @@ export class PortfolioSnapshot {
@Type(() => Big) @Type(() => Big)
currentValueInBaseCurrency: Big; currentValueInBaseCurrency: Big;
errors?: AssetProfileIdentifier[]; errors: AssetProfileIdentifier[];
hasErrors: boolean; hasErrors: boolean;

Loading…
Cancel
Save