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,
netPerformanceInPercentage,
netWorth,
totalAccountBalance,
totalAccountBalance,
totalInvestment,
value
value
}) => {
return {
date,

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

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

Loading…
Cancel
Save