|
@ -49,7 +49,7 @@ import { |
|
|
min, |
|
|
min, |
|
|
subDays |
|
|
subDays |
|
|
} from 'date-fns'; |
|
|
} from 'date-fns'; |
|
|
import { isNumber, sortBy, sum, uniq, uniqBy } from 'lodash'; |
|
|
import { isNumber, sortBy, sum, uniqBy } from 'lodash'; |
|
|
|
|
|
|
|
|
export abstract class PortfolioCalculator { |
|
|
export abstract class PortfolioCalculator { |
|
|
protected static readonly ENABLE_LOGGING = false; |
|
|
protected static readonly ENABLE_LOGGING = false; |
|
@ -222,7 +222,7 @@ export abstract class PortfolioCalculator { |
|
|
|
|
|
|
|
|
const exchangeRatesByCurrency = |
|
|
const exchangeRatesByCurrency = |
|
|
await this.exchangeRateDataService.getExchangeRatesByCurrency({ |
|
|
await this.exchangeRateDataService.getExchangeRatesByCurrency({ |
|
|
currencies: uniq(Object.values(currencies)), |
|
|
currencies: Array.from(new Set(Object.values(currencies))), |
|
|
endDate: endOfDay(this.endDate), |
|
|
endDate: endOfDay(this.endDate), |
|
|
startDate: this.startDate, |
|
|
startDate: this.startDate, |
|
|
targetCurrency: this.currency |
|
|
targetCurrency: this.currency |
|
|