|
|
|
@ -524,10 +524,6 @@ export class PortfolioService { |
|
|
|
return type === 'ACCOUNT'; |
|
|
|
}) ?? false; |
|
|
|
|
|
|
|
const isFilteredByCash = filters?.some(({ id, type }) => { |
|
|
|
return id === AssetClass.LIQUIDITY && type === 'ASSET_CLASS'; |
|
|
|
}); |
|
|
|
|
|
|
|
const isFilteredByClosedHoldings = |
|
|
|
filters?.some(({ id, type }) => { |
|
|
|
return id === 'CLOSED' && type === 'HOLDING_TYPE'; |
|
|
|
@ -662,18 +658,6 @@ export class PortfolioService { |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
if (filters?.length === 0 || isFilteredByAccount || isFilteredByCash) { |
|
|
|
const cashPositions = this.getCashPositions({ |
|
|
|
cashDetails, |
|
|
|
userCurrency, |
|
|
|
value: filteredValueInBaseCurrency |
|
|
|
}); |
|
|
|
|
|
|
|
for (const symbol of Object.keys(cashPositions)) { |
|
|
|
holdings[symbol] = cashPositions[symbol]; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const { accounts, platforms } = await this.getValueOfAccountsAndPlatforms({ |
|
|
|
activities, |
|
|
|
filters, |
|
|
|
|