|
|
@ -483,7 +483,8 @@ export class OrderService {
|
|
|
|
assetProfileIdentifiers
|
|
|
|
assetProfileIdentifiers
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
const activities = orders.map((order) => {
|
|
|
|
const activities = await Promise.all(
|
|
|
|
|
|
|
|
orders.map(async (order) => {
|
|
|
|
const assetProfile = assetProfiles.find(({ dataSource, symbol }) => {
|
|
|
|
const assetProfile = assetProfiles.find(({ dataSource, symbol }) => {
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
dataSource === order.SymbolProfile.dataSource &&
|
|
|
|
dataSource === order.SymbolProfile.dataSource &&
|
|
|
@ -496,21 +497,24 @@ export class OrderService {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
...order,
|
|
|
|
...order,
|
|
|
|
value,
|
|
|
|
value,
|
|
|
|
// TODO: Use exchange rate of date
|
|
|
|
feeInBaseCurrency:
|
|
|
|
feeInBaseCurrency: this.exchangeRateDataService.toCurrency(
|
|
|
|
await this.exchangeRateDataService.toCurrencyAtDate(
|
|
|
|
order.fee,
|
|
|
|
order.fee,
|
|
|
|
order.SymbolProfile.currency,
|
|
|
|
order.SymbolProfile.currency,
|
|
|
|
userCurrency
|
|
|
|
userCurrency,
|
|
|
|
|
|
|
|
order.date
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SymbolProfile: assetProfile,
|
|
|
|
SymbolProfile: assetProfile,
|
|
|
|
// TODO: Use exchange rate of date
|
|
|
|
valueInBaseCurrency:
|
|
|
|
valueInBaseCurrency: this.exchangeRateDataService.toCurrency(
|
|
|
|
await this.exchangeRateDataService.toCurrencyAtDate(
|
|
|
|
value,
|
|
|
|
value,
|
|
|
|
order.SymbolProfile.currency,
|
|
|
|
order.SymbolProfile.currency,
|
|
|
|
userCurrency
|
|
|
|
userCurrency,
|
|
|
|
|
|
|
|
order.date
|
|
|
|
)
|
|
|
|
)
|
|
|
|
};
|
|
|
|
};
|
|
|
|
});
|
|
|
|
})
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
return { activities, count };
|
|
|
|
return { activities, count };
|
|
|
|
}
|
|
|
|
}
|
|
|
|