Feature/optimize portfolio calculations with smarter cloning of activities (#3827)
* Optimize portfolio calculations with smarter cloning of activities * Update changelog
This commit is contained in:
parent
ed30549f6b
commit
33de8a10bb
@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
- Optimized the portfolio calculations with smarter cloning of activities
|
||||||
- Integrated the add currency functionality into the market data section of the admin control panel
|
- Integrated the add currency functionality into the market data section of the admin control panel
|
||||||
- Improved the language localization for German (`de`)
|
- Improved the language localization for German (`de`)
|
||||||
- Upgraded `prisma` from version `5.19.1` to `5.20.0`
|
- Upgraded `prisma` from version `5.19.1` to `5.20.0`
|
||||||
|
@ -180,10 +180,10 @@ export class TWRPortfolioCalculator extends PortfolioCalculator {
|
|||||||
let valueAtStartDateWithCurrencyEffect: Big;
|
let valueAtStartDateWithCurrencyEffect: Big;
|
||||||
|
|
||||||
// Clone orders to keep the original values in this.orders
|
// Clone orders to keep the original values in this.orders
|
||||||
let orders: PortfolioOrderItem[] = cloneDeep(this.activities).filter(
|
let orders: PortfolioOrderItem[] = cloneDeep(
|
||||||
({ SymbolProfile }) => {
|
this.activities.filter(({ SymbolProfile }) => {
|
||||||
return SymbolProfile.symbol === symbol;
|
return SymbolProfile.symbol === symbol;
|
||||||
}
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
if (orders.length <= 0) {
|
if (orders.length <= 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user