Browse Source
Bugfix/fix asset class of cash position for empty account (#2378)
* Fix assetClass and assetSubClass
* Update changelog
pull/2379/head^2
Thomas Kaul
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
12 additions and
2 deletions
-
CHANGELOG.md
-
apps/api/src/app/portfolio/portfolio.controller.ts
|
|
@ -13,6 +13,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
|
- Added support for dates in `DD.MM.YYYY` format in the activities import |
|
|
|
- Set up the language localization for Türkçe (`tr`) |
|
|
|
|
|
|
|
### Fixed |
|
|
|
|
|
|
|
- Fixed an issue with the cash position in the holdings table |
|
|
|
|
|
|
|
## 2.4.0 - 2023-09-19 |
|
|
|
|
|
|
|
### Added |
|
|
|
|
|
@ -173,8 +173,14 @@ export class PortfolioController { |
|
|
|
for (const [symbol, portfolioPosition] of Object.entries(holdings)) { |
|
|
|
holdings[symbol] = { |
|
|
|
...portfolioPosition, |
|
|
|
assetClass: hasDetails ? portfolioPosition.assetClass : undefined, |
|
|
|
assetSubClass: hasDetails ? portfolioPosition.assetSubClass : undefined, |
|
|
|
assetClass: |
|
|
|
hasDetails || portfolioPosition.assetClass === 'CASH' |
|
|
|
? portfolioPosition.assetClass |
|
|
|
: undefined, |
|
|
|
assetSubClass: |
|
|
|
hasDetails || portfolioPosition.assetSubClass === 'CASH' |
|
|
|
? portfolioPosition.assetSubClass |
|
|
|
: undefined, |
|
|
|
countries: hasDetails ? portfolioPosition.countries : [], |
|
|
|
currency: hasDetails ? portfolioPosition.currency : undefined, |
|
|
|
markets: hasDetails ? portfolioPosition.markets : undefined, |
|
|
|