From 865c6245ec7a196660ffc87a129010fcfe97ba29 Mon Sep 17 00:00:00 2001 From: Thomas <4159106+dtslvr@users.noreply.github.com> Date: Thu, 12 Aug 2021 23:18:36 +0200 Subject: [PATCH] Improvement after code review --- apps/api/src/app/portfolio/portfolio.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/api/src/app/portfolio/portfolio.service.ts b/apps/api/src/app/portfolio/portfolio.service.ts index 367dd20cd..6f9b019cb 100644 --- a/apps/api/src/app/portfolio/portfolio.service.ts +++ b/apps/api/src/app/portfolio/portfolio.service.ts @@ -672,10 +672,10 @@ export class PortfolioService { const totalBuy = this.getTotalByType(orders, currency, TypeOfOrder.BUY); const totalSell = this.getTotalByType(orders, currency, TypeOfOrder.SELL); - const committedFunds = new Big(totalBuy).sub(new Big(totalSell)); + const committedFunds = new Big(totalBuy).sub(totalSell); const netWorth = new Big(balance) - .plus(new Big(performanceInformation.performance.currentValue)) + .plus(performanceInformation.performance.currentValue) .toNumber(); return {