diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b97f9cc6..f2464c350 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Set up a git-hook via `husky` to lint and format the changes before a commit +### Fixed + +- Handled an exception in the historical market data gathering of derived currencies + ## 2.112.0 - 2024-10-03 ### Added diff --git a/apps/api/src/services/data-provider/data-provider.service.ts b/apps/api/src/services/data-provider/data-provider.service.ts index e5eda2d7e..bd20541af 100644 --- a/apps/api/src/services/data-provider/data-provider.service.ts +++ b/apps/api/src/services/data-provider/data-provider.service.ts @@ -666,9 +666,13 @@ export class DataProviderService { } = {}; for (const date in rootData) { - data[date] = { - marketPrice: new Big(factor).mul(rootData[date].marketPrice).toNumber() - }; + if (isNumber(rootData[date].marketPrice)) { + data[date] = { + marketPrice: new Big(factor) + .mul(rootData[date].marketPrice) + .toNumber() + }; + } } return data;