Manushreshta B L
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
7 additions and
7 deletions
-
apps/api/src/app/portfolio/portfolio.service.ts
|
|
@ -1197,14 +1197,14 @@ export class PortfolioService { |
|
|
|
).div(100); |
|
|
|
} |
|
|
|
|
|
|
|
const balancesValue = await this.accountBalanceService.getAccountBalances({ |
|
|
|
userId: userId |
|
|
|
const accountBalances = await this.accountBalanceService.getAccountBalances({ |
|
|
|
userId |
|
|
|
}); |
|
|
|
|
|
|
|
let totalBalance = 0; |
|
|
|
|
|
|
|
balancesValue.balances.map((item) => { |
|
|
|
totalBalance += item.value; |
|
|
|
balancesValue.balances.map(({value) => { |
|
|
|
totalBalance += value; |
|
|
|
}); |
|
|
|
|
|
|
|
return { |
|
|
@ -1221,11 +1221,11 @@ export class PortfolioService { |
|
|
|
return { |
|
|
|
date, |
|
|
|
netPerformanceInPercentage, |
|
|
|
value, |
|
|
|
netPerformance: netPerformanceOfItem, |
|
|
|
totalInvestment: totalInvestmentOfItem, |
|
|
|
netWorth: value + totalBalance, |
|
|
|
totalAccountBalance: totalBalance, |
|
|
|
netWorth: value + totalBalance |
|
|
|
totalInvestment: totalInvestmentOfItem, |
|
|
|
value |
|
|
|
}; |
|
|
|
} |
|
|
|
), |
|
|
|