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
parent
commit
1a4109ebaa
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      CHANGELOG.md
  2. 4
      apps/api/src/services/exchange-rate-data.service.ts

6
CHANGELOG.md

@ -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

4
apps/api/src/services/exchange-rate-data.service.ts

@ -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 };

Loading…
Cancel
Save