Browse Source
Bugfix/Handle exception in historical market data gathering of derived currencies (#3858)
* Handle exception in historical market data gathering of derived currencies
* Update changelog
---------
Co-authored-by: Dan <dan@ddev.ch>
pull/3871/head
dandevaud
4 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
13 additions and
3 deletions
-
CHANGELOG.md
-
apps/api/src/services/data-provider/data-provider.service.ts
|
@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. |
|
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), |
|
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), |
|
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). |
|
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). |
|
|
|
|
|
|
|
|
|
|
|
## Unreleased |
|
|
|
|
|
|
|
|
|
|
|
### Fixed |
|
|
|
|
|
|
|
|
|
|
|
- Handled an exception in the historical market data gathering of derived currencies |
|
|
|
|
|
|
|
|
## 2.112.0 - 2024-10-03 |
|
|
## 2.112.0 - 2024-10-03 |
|
|
|
|
|
|
|
|
### Added |
|
|
### Added |
|
|
|
@ -666,10 +666,14 @@ export class DataProviderService { |
|
|
} = {}; |
|
|
} = {}; |
|
|
|
|
|
|
|
|
for (const date in rootData) { |
|
|
for (const date in rootData) { |
|
|
|
|
|
if (isNumber(rootData[date].marketPrice)) { |
|
|
data[date] = { |
|
|
data[date] = { |
|
|
marketPrice: new Big(factor).mul(rootData[date].marketPrice).toNumber() |
|
|
marketPrice: new Big(factor) |
|
|
|
|
|
.mul(rootData[date].marketPrice) |
|
|
|
|
|
.toNumber() |
|
|
}; |
|
|
}; |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
return data; |
|
|
return data; |
|
|
} |
|
|
} |
|
|