From ba3b4564cd0e4002349385b362de02023ce5f6e0 Mon Sep 17 00:00:00 2001 From: Valentin Zickner <3200232+vzickner@users.noreply.github.com> Date: Fri, 6 Aug 2021 21:47:27 +0200 Subject: [PATCH] Bugfix/dashboard currencies (#260) * filter list of orders only for relevant orders * Update changelog Co-authored-by: Valentin Zickner Co-authored-by: Thomas <4159106+dtslvr@users.noreply.github.com> --- CHANGELOG.md | 6 ++++++ apps/api/src/app/portfolio/portfolio.service.ts | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c7a103ab..5e3e21ee6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 + +- Fixed an issue with the currency conversion of the market price in the position detail dialog + ## 1.33.0 - 05.08.2021 ### Fixed diff --git a/apps/api/src/app/portfolio/portfolio.service.ts b/apps/api/src/app/portfolio/portfolio.service.ts index 9de48ead4..5bb2a7114 100644 --- a/apps/api/src/app/portfolio/portfolio.service.ts +++ b/apps/api/src/app/portfolio/portfolio.service.ts @@ -258,7 +258,9 @@ export class PortfolioService { ): Promise { const userId = await this.getUserId(aImpersonationId); - const orders = await this.getOrders(userId); + const orders = (await this.getOrders(userId)).filter( + (order) => order.symbol === aSymbol + ); if (orders.length <= 0) { return {