Browse Source
Bugfix/fix fallback to load currencies directly from data provider (#629)
* Fix fallback
* Update changelog
pull/630/head
Thomas Kaul
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
8 additions and
2 deletions
-
CHANGELOG.md
-
apps/api/src/services/exchange-rate-data.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/), |
|
|
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). |
|
|
|
|
|
|
|
## Unreleased |
|
|
|
|
|
|
|
### Fixed |
|
|
|
|
|
|
|
- Fixed the fallback to load currencies directly from the data provider |
|
|
|
|
|
|
|
## 1.103.0 - 13.01.2022 |
|
|
|
|
|
|
|
### Changed |
|
|
|
|
|
@ -58,9 +58,9 @@ export class ExchangeRateDataService { |
|
|
|
getYesterday() |
|
|
|
); |
|
|
|
|
|
|
|
if (isEmpty(result)) { |
|
|
|
if (Object.keys(result).length !== this.currencyPairs.length) { |
|
|
|
// Load currencies directly from data provider as a fallback
|
|
|
|
// if historical data is not yet available
|
|
|
|
// if historical data is not fully available
|
|
|
|
const historicalData = await this.dataProviderService.get( |
|
|
|
this.currencyPairs.map(({ dataSource, symbol }) => { |
|
|
|
return { dataSource, symbol }; |
|
|
|