Browse Source

Improvement after code review

pull/285/head
Thomas 4 years ago
parent
commit
865c6245ec
  1. 4
      apps/api/src/app/portfolio/portfolio.service.ts

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

@ -672,10 +672,10 @@ export class PortfolioService {
const totalBuy = this.getTotalByType(orders, currency, TypeOfOrder.BUY); const totalBuy = this.getTotalByType(orders, currency, TypeOfOrder.BUY);
const totalSell = this.getTotalByType(orders, currency, TypeOfOrder.SELL); const totalSell = this.getTotalByType(orders, currency, TypeOfOrder.SELL);
const committedFunds = new Big(totalBuy).sub(new Big(totalSell)); const committedFunds = new Big(totalBuy).sub(totalSell);
const netWorth = new Big(balance) const netWorth = new Big(balance)
.plus(new Big(performanceInformation.performance.currentValue)) .plus(performanceInformation.performance.currentValue)
.toNumber(); .toNumber();
return { return {

Loading…
Cancel
Save