Browse Source

Missing exchange rates gathered

csehatt741 6 days ago
committed by Attila Cseh
parent
commit
5af83dca4a
  1. 39
      apps/api/src/app/import/import.service.ts

39
apps/api/src/app/import/import.service.ts

@ -419,14 +419,43 @@ export class ImportService {
}); });
}); });
this.dataGatheringService.gatherSymbols({ const dataGatheringItems = uniqueActivities.flatMap(
dataGatheringItems: uniqueActivities.map(({ date, SymbolProfile }) => { ({ currency, date, SymbolProfile }) => {
return { const activityDataGatheringItems = [
{
date, date,
dataSource: SymbolProfile.dataSource, dataSource: SymbolProfile.dataSource,
symbol: SymbolProfile.symbol symbol: SymbolProfile.symbol
}; }
}), ];
if (currency !== SymbolProfile.currency) {
activityDataGatheringItems.push({
date,
dataSource:
this.dataProviderService.getDataSourceForExchangeRates(),
symbol: `${currency}${SymbolProfile.currency}`
});
}
if (
(currency ?? SymbolProfile.currency) !==
user.Settings.settings.baseCurrency
) {
activityDataGatheringItems.push({
date,
dataSource:
this.dataProviderService.getDataSourceForExchangeRates(),
symbol: `${currency ?? SymbolProfile.currency}${user.Settings.settings.baseCurrency}`
});
}
return activityDataGatheringItems;
}
);
this.dataGatheringService.gatherSymbols({
dataGatheringItems,
priority: DATA_GATHERING_QUEUE_PRIORITY_HIGH priority: DATA_GATHERING_QUEUE_PRIORITY_HIGH
}); });
} }

Loading…
Cancel
Save