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/3858/head
Dan 11 months ago
committed by Thomas Kaul
parent
commit
99b3b0965c
  1. 4
      apps/api/src/services/data-provider/data-provider.service.ts

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

@ -667,7 +667,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