From 9e4a49d8118ee8505bcf38978f6837db0add5fa2 Mon Sep 17 00:00:00 2001 From: Thomas <4159106+dtslvr@users.noreply.github.com> Date: Sat, 31 Jul 2021 23:57:59 +0200 Subject: [PATCH] Remove fallback --- apps/api/src/app/core/portfolio-calculator.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/apps/api/src/app/core/portfolio-calculator.ts b/apps/api/src/app/core/portfolio-calculator.ts index 75aab355f..ebfbc3803 100644 --- a/apps/api/src/app/core/portfolio-calculator.ts +++ b/apps/api/src/app/core/portfolio-calculator.ts @@ -160,7 +160,6 @@ export class PortfolioCalculator { } } - dates.push(resetHours(subDays(today, 1))); dates.push(resetHours(today)); const marketSymbols = await this.currentRateService.getValues({ @@ -192,12 +191,7 @@ export class PortfolioCalculator { const holdingPeriodReturns: { [symbol: string]: Big } = {}; const grossPerformance: { [symbol: string]: Big } = {}; - let todayString = format(today, DATE_FORMAT); - // in case no symbols are there for today, use yesterday - if (!marketSymbolMap[todayString]) { - hasErrors = true; - todayString = format(subDays(today, 1), DATE_FORMAT); - } + const todayString = format(today, DATE_FORMAT); if (firstIndex > 0) { firstIndex--;