Bugfix/fix asset class of cash position for empty account (#2378)
* Fix assetClass and assetSubClass * Update changelog
This commit is contained in:
parent
703a96f4db
commit
0f7c6ff0fe
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user