Browse Source

Fix exchange rate gathering job

- Handling for Subcurrencies if main currency does not have date (i.e. GBP on 08.10.2013 will fail when trying to convert to GBp)
pull/5027/head
Dan 9 months ago
parent
commit
7838153299
  1. 4
      apps/api/src/services/data-provider/data-provider.service.ts

4
apps/api/src/services/data-provider/data-provider.service.ts

@ -690,7 +690,9 @@ export class DataProviderService {
for (const date in rootData) {
data[date] = {
marketPrice: new Big(factor).mul(rootData[date].marketPrice).toNumber()
marketPrice: rootData[date].marketPrice
? new Big(factor).mul(rootData[date].marketPrice).toNumber()
: null
};
}

Loading…
Cancel
Save