|
|
@ -787,7 +787,7 @@ export class PortfolioService { |
|
|
{ dataSource, symbol } |
|
|
{ dataSource, symbol } |
|
|
]); |
|
|
]); |
|
|
|
|
|
|
|
|
const SymbolProfile = |
|
|
const assetProfile = |
|
|
symbolProfile ?? |
|
|
symbolProfile ?? |
|
|
({ |
|
|
({ |
|
|
dataSource, |
|
|
dataSource, |
|
|
@ -843,9 +843,10 @@ export class PortfolioService { |
|
|
timeWeightedInvestmentWithCurrencyEffect |
|
|
timeWeightedInvestmentWithCurrencyEffect |
|
|
} = holding; |
|
|
} = holding; |
|
|
|
|
|
|
|
|
const activitiesOfHolding = activities.filter(({ assetProfile }) => { |
|
|
const activitiesOfHolding = activities.filter((activity) => { |
|
|
return ( |
|
|
return ( |
|
|
assetProfile.dataSource === dataSource && assetProfile.symbol === symbol |
|
|
activity.assetProfile.dataSource === dataSource && |
|
|
|
|
|
activity.assetProfile.symbol === symbol |
|
|
); |
|
|
); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
@ -959,16 +960,16 @@ export class PortfolioService { |
|
|
marketPriceMin, |
|
|
marketPriceMin, |
|
|
tags, |
|
|
tags, |
|
|
assetProfile: { |
|
|
assetProfile: { |
|
|
assetClass: SymbolProfile.assetClass, |
|
|
assetClass: assetProfile.assetClass, |
|
|
assetSubClass: SymbolProfile.assetSubClass, |
|
|
assetSubClass: assetProfile.assetSubClass, |
|
|
countries: SymbolProfile.countries, |
|
|
countries: assetProfile.countries, |
|
|
currency: SymbolProfile.currency, |
|
|
currency: assetProfile.currency, |
|
|
dataSource: SymbolProfile.dataSource, |
|
|
dataSource: assetProfile.dataSource, |
|
|
isin: SymbolProfile.isin, |
|
|
isin: assetProfile.isin, |
|
|
name: SymbolProfile.name, |
|
|
name: assetProfile.name, |
|
|
sectors: SymbolProfile.sectors, |
|
|
sectors: assetProfile.sectors, |
|
|
symbol: SymbolProfile.symbol, |
|
|
symbol: assetProfile.symbol, |
|
|
userId: SymbolProfile.userId |
|
|
userId: assetProfile.userId |
|
|
}, |
|
|
}, |
|
|
averagePrice: averagePrice.toNumber(), |
|
|
averagePrice: averagePrice.toNumber(), |
|
|
dataProviderInfo: portfolioCalculator.getDataProviderInfos()?.[0], |
|
|
dataProviderInfo: portfolioCalculator.getDataProviderInfos()?.[0], |
|
|
|