Browse Source

Refactoring

pull/7538/head
Thomas Kaul 3 weeks ago
parent
commit
ab177361d7
  1. 14
      apps/api/src/app/portfolio/portfolio.service.ts

14
apps/api/src/app/portfolio/portfolio.service.ts

@ -1136,19 +1136,19 @@ export class PortfolioService {
withSummary: true
});
const hasOpenHoldings = Object.keys(holdings).length > 0;
const emergencyFundHoldingsValueInBaseCurrency =
this.getEmergencyFundHoldingsValueInBaseCurrency({ holdings });
const emergencyFundInBaseCurrency = userSettings.emergencyFund ?? 0;
const { balanceInBaseCurrency: cashBalanceInBaseCurrency } =
await this.accountService.getCashDetails({
userId,
currency: this.getUserCurrency()
});
const emergencyFundInBaseCurrency = userSettings.emergencyFund ?? 0;
const emergencyFundHoldingsValueInBaseCurrency =
this.getEmergencyFundHoldingsValueInBaseCurrency({ holdings });
const hasOpenHoldings = Object.keys(holdings).length > 0;
const marketsAdvancedTotalInBaseCurrency = getSum(
Object.values(marketsAdvanced).map(({ valueInBaseCurrency }) => {
return new Big(valueInBaseCurrency);

Loading…
Cancel
Save