Browse Source

Fix exception with market state

pull/602/head
Thomas 4 years ago
parent
commit
c033566bee
  1. 4
      apps/api/src/app/portfolio/portfolio.service.ts

4
apps/api/src/app/portfolio/portfolio.service.ts

@ -662,7 +662,9 @@ 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, marketState:
dataProviderResponses[position.symbol]?.marketState ??
MarketState.delayed,
name: symbolProfileMap[position.symbol].name, name: symbolProfileMap[position.symbol].name,
netPerformance: position.netPerformance?.toNumber() ?? null, netPerformance: position.netPerformance?.toNumber() ?? null,
netPerformancePercentage: netPerformancePercentage:

Loading…
Cancel
Save