@ -17,7 +17,7 @@ export class ExportService {
date: true,
fee: true,
quantity: true,
symbol: true,
SymbolProfile: true,
type: true,
unitPrice: true
},
@ -26,7 +26,30 @@ export class ExportService {
return {
meta: { date: new Date().toISOString(), version: environment.version },
orders
orders: orders.map(
({
accountId,
currency,
date,
fee,
quantity,
SymbolProfile,
type,
unitPrice
}) => {
unitPrice,
dataSource: SymbolProfile.dataSource,
symbol: SymbolProfile.symbol
};
}
)
@ -407,8 +407,11 @@ export class PortfolioServiceNew {
const orders = (
await this.orderService.getOrders({ userCurrency, userId })
).filter((order) => {
return order.dataSource === aDataSource && order.symbol === aSymbol;
).filter(({ SymbolProfile }) => {
return (
SymbolProfile.dataSource === aDataSource &&
SymbolProfile.symbol === aSymbol
);
});
if (orders.length <= 0) {
@ -395,8 +395,11 @@ export class PortfolioService {