Browse Source

Task/refactor deprecated currency to asset profile in public controller (#6775)

Refactor deprecated currency to asset profile
pull/6837/merge
Thomas Kaul 1 week ago
committed by GitHub
parent
commit
fb5716c8a7
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  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( const totalValue = getSum(
Object.values(holdings).map(({ currency, marketPrice, quantity }) => { Object.values(holdings).map(({ assetProfile, marketPrice, quantity }) => {
return new Big( return new Big(
this.exchangeRateDataService.toCurrency( this.exchangeRateDataService.toCurrency(
quantity * marketPrice, quantity * marketPrice,
currency, assetProfile.currency,
this.request.user?.settings?.settings.baseCurrency ?? this.request.user?.settings?.settings.baseCurrency ??
DEFAULT_CURRENCY DEFAULT_CURRENCY
) )

Loading…
Cancel
Save