Bugfix/fix missing market state in positions (#250)
* Fix missing market state in positions * Update changelog
This commit is contained in:
parent
b7943889da
commit
b7d950f3f9
@ -12,6 +12,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- Added the name to the position detail dialog when opened from the transactions table
|
- Added the name to the position detail dialog when opened from the transactions table
|
||||||
- Added a screenshot to the blog posts
|
- Added a screenshot to the blog posts
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fixed the missing market state in the positions tab
|
||||||
|
|
||||||
## 1.31.1 - 01.08.2021
|
## 1.31.1 - 01.08.2021
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
@ -442,7 +442,8 @@ export class PortfolioService {
|
|||||||
(position) => position.symbol
|
(position) => position.symbol
|
||||||
);
|
);
|
||||||
|
|
||||||
const [symbolProfiles] = await Promise.all([
|
const [dataProviderResponses, symbolProfiles] = await Promise.all([
|
||||||
|
this.dataProviderService.get(symbols),
|
||||||
this.symbolProfileService.getSymbolProfiles(symbols)
|
this.symbolProfileService.getSymbolProfiles(symbols)
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@ -461,6 +462,7 @@ export class PortfolioService {
|
|||||||
grossPerformancePercentage:
|
grossPerformancePercentage:
|
||||||
position.grossPerformancePercentage?.toNumber() ?? null,
|
position.grossPerformancePercentage?.toNumber() ?? null,
|
||||||
investment: new Big(position.investment).toNumber(),
|
investment: new Big(position.investment).toNumber(),
|
||||||
|
marketState: dataProviderResponses[position.symbol].marketState,
|
||||||
name: symbolProfileMap[position.symbol].name,
|
name: symbolProfileMap[position.symbol].name,
|
||||||
quantity: new Big(position.quantity).toNumber()
|
quantity: new Big(position.quantity).toNumber()
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user