Browse Source

Missing exchange rates gathered

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

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

@ -419,14 +419,43 @@ export class ImportService {
});
});
const dataGatheringItems = uniqueActivities.flatMap(
({ currency, date, SymbolProfile }) => {
const activityDataGatheringItems = [
{
date,
dataSource: SymbolProfile.dataSource,
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: uniqueActivities.map(({ date, SymbolProfile }) => {
return {
date,
dataSource: SymbolProfile.dataSource,
symbol: SymbolProfile.symbol
};
}),
dataGatheringItems,
priority: DATA_GATHERING_QUEUE_PRIORITY_HIGH
});
}

Loading…
Cancel
Save