Bugfix/filter out positions without quantity (#317)

* Filter out positions without any quantity

* Update changelog
pull/318/head
Thomas Kaul 3 years ago committed by GitHub
parent 695c378b48
commit c5bb3023d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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/), 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). 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 ## 1.43.0 - 24.08.2021
### Added ### Added

@ -211,6 +211,11 @@ export class PortfolioService {
} }
for (const item of currentPositions.positions) { 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 value = item.quantity.mul(item.marketPrice);
const symbolProfile = symbolProfileMap[item.symbol]; const symbolProfile = symbolProfileMap[item.symbol];
const dataProviderResponse = dataProviderResponses[item.symbol]; const dataProviderResponse = dataProviderResponses[item.symbol];

Loading…
Cancel
Save