Task/refactor getDividends() from async to sync (#6222)

* Refactor from async to sync
pull/6247/head
Thomas Kaul 4 months ago committed by GitHub
parent 5e553f0710
commit 30be7589b6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -329,7 +329,7 @@ export class PortfolioController {
types: ['DIVIDEND']
});
let dividends = await this.portfolioService.getDividends({
let dividends = this.portfolioService.getDividends({
activities,
groupBy
});

@ -325,13 +325,13 @@ export class PortfolioService {
};
}
public async getDividends({
public getDividends({
activities,
groupBy
}: {
activities: Activity[];
groupBy?: GroupBy;
}): Promise<InvestmentItem[]> {
}): InvestmentItem[] {
let dividends = activities.map(({ currency, date, value }) => {
return {
date: format(date, DATE_FORMAT),

Loading…
Cancel
Save