Browse Source

Refactor deprecated currency to asset profile

pull/6775/head
Thomas Kaul 3 weeks ago
parent
commit
325e2f8db3
  1. 4
      apps/api/src/app/endpoints/public/public.controller.ts

4
apps/api/src/app/endpoints/public/public.controller.ts

@ -151,11 +151,11 @@ export class PublicController {
};
const totalValue = getSum(
Object.values(holdings).map(({ currency, marketPrice, quantity }) => {
Object.values(holdings).map(({ assetProfile, marketPrice, quantity }) => {
return new Big(
this.exchangeRateDataService.toCurrency(
quantity * marketPrice,
currency,
assetProfile.currency,
this.request.user?.settings?.settings.baseCurrency ??
DEFAULT_CURRENCY
)

Loading…
Cancel
Save