From 559983039a2d4a850f616444e0589207326c1372 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Fri, 10 May 2024 08:15:36 +0200 Subject: [PATCH] Add type and TODOs --- .../app/portfolio/calculator/portfolio-calculator.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/api/src/app/portfolio/calculator/portfolio-calculator.ts b/apps/api/src/app/portfolio/calculator/portfolio-calculator.ts index 66ad2ffa1..4428799b4 100644 --- a/apps/api/src/app/portfolio/calculator/portfolio-calculator.ts +++ b/apps/api/src/app/portfolio/calculator/portfolio-calculator.ts @@ -616,6 +616,7 @@ export abstract class PortfolioCalculator { netPerformance: totalNetPerformanceValue.toNumber(), netPerformanceWithCurrencyEffect: totalNetPerformanceValueWithCurrencyEffect.toNumber(), + netWorth: 0, // TODO totalInvestment: totalInvestmentValue.toNumber(), totalInvestmentValueWithCurrencyEffect: totalInvestmentValueWithCurrencyEffect.toNumber(), @@ -1096,7 +1097,7 @@ export abstract class PortfolioCalculator { const { chartData } = this.snapshot; - const newChartData = []; + const newChartData: HistoricalDataItem[] = []; let netPerformanceAtStartDate; let netPerformanceWithCurrencyEffectAtStartDate; @@ -1147,7 +1148,12 @@ export abstract class PortfolioCalculator { netPerformanceInPercentageWithCurrencyEffect: (netPerformanceWithCurrencyEffectSinceStartDate / timeWeightedInvestmentValue) * - 100 + 100, + // TODO: Add net worth with valuables + // netWorth: totalCurrentValueWithCurrencyEffect + // .plus(totalAccountBalanceWithCurrencyEffect) + // .toNumber() + netWorth: 0 }); } }