Bugfix/filter out positions without quantity (#317)
* Filter out positions without any quantity * Update changelog
This commit is contained in:
parent
695c378b48
commit
c5bb3023d3
@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## Unreleased
|
||||
|
||||
### Fixed
|
||||
|
||||
- Filtered out positions without any quantity in the positions table
|
||||
|
||||
## 1.43.0 - 24.08.2021
|
||||
|
||||
### Added
|
||||
|
@ -211,6 +211,11 @@ export class PortfolioService {
|
||||
}
|
||||
|
||||
for (const item of currentPositions.positions) {
|
||||
if (item.quantity.lte(0)) {
|
||||
// Ignore positions without any quantity
|
||||
continue;
|
||||
}
|
||||
|
||||
const value = item.quantity.mul(item.marketPrice);
|
||||
const symbolProfile = symbolProfileMap[item.symbol];
|
||||
const dataProviderResponse = dataProviderResponses[item.symbol];
|
||||
|
Loading…
x
Reference in New Issue
Block a user