Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍
TypeScript angularetffinancefintechghostfoliohacktoberfestinvestingnestjsosspersonal-financeportfolioprismasoftwarestocktrackertradingtypescriptwealth-managementweb
Feature/increase timeout to load currencies (#2800)
Thomas Kaulb89bf1d5e80b
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 05ad3599c3..744f3f6f7e 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0### Changed- Changed the performance calculation to a time-weighted approach+- Increased the timeout to load currencies in the exchange rate data service- Exposed the environment variable `REQUEST_TIMEOUT`- Used the `HasPermission` annotation in endpoints- Improved the language localization for German (`de`)diff --git a/apps/api/src/services/exchange-rate-data/exchange-rate-data.service.ts b/apps/api/src/services/exchange-rate-data/exchange-rate-data.service.tsindex cf61786c9e..9eecd400d6 100644--- a/apps/api/src/services/exchange-rate-data/exchange-rate-data.service.ts+++ b/apps/api/src/services/exchange-rate-data/exchange-rate-data.service.ts@@ -11,6 +11,7 @@ import { DATE_FORMAT, getYesterday } from '@ghostfolio/common/helper';import { Injectable, Logger } from '@nestjs/common';import { format, isToday } from 'date-fns';import { isNumber, uniq } from 'lodash';+import ms from 'ms';@Injectable()export class ExchangeRateDataService {@@ -75,7 +76,8 @@ export class ExchangeRateDataService {const quotes = await this.dataProviderService.getQuotes({items: this.currencyPairs.map(({ dataSource, symbol }) => {return { dataSource, symbol };- })+ }),+ requestTimeout: ms('30 seconds')});for (const symbol of Object.keys(quotes)) {