Browse Source

Format checks

pull/2569/head
Manushreshta B L 2 years ago
parent
commit
8fc5d167ce
  1. 4
      apps/api/src/app/portfolio/portfolio.controller.ts
  2. 14
      apps/api/src/app/portfolio/portfolio.service.ts

4
apps/api/src/app/portfolio/portfolio.controller.ts

@ -350,9 +350,9 @@ export class PortfolioController {
date, date,
netPerformanceInPercentage, netPerformanceInPercentage,
netWorth, netWorth,
totalAccountBalance, totalAccountBalance,
totalInvestment, totalInvestment,
value value
}) => { }) => {
return { return {
date, date,

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

@ -1197,13 +1197,15 @@ export class PortfolioService {
).div(100); ).div(100);
} }
const accountBalances = await this.accountBalanceService.getAccountBalances({ const accountBalances = await this.accountBalanceService.getAccountBalances(
userId {
}); userId
}
);
let totalBalance = 0; let totalBalance = 0;
balancesValue.balances.map(({value) => { accountBalances.balances.map(({ value }) => {
totalBalance += value; totalBalance += value;
}); });
@ -1222,9 +1224,9 @@ export class PortfolioService {
date, date,
netPerformanceInPercentage, netPerformanceInPercentage,
netPerformance: netPerformanceOfItem, netPerformance: netPerformanceOfItem,
netWorth: value + totalBalance, netWorth: value + totalBalance,
totalAccountBalance: totalBalance, totalAccountBalance: totalBalance,
totalInvestment: totalInvestmentOfItem, totalInvestment: totalInvestmentOfItem,
value value
}; };
} }

Loading…
Cancel
Save