Browse Source

Remove double iteration

pull/5027/head
Dan 9 months ago
parent
commit
2dffad5a2a
  1. 7
      apps/api/src/app/portfolio/portfolio.service.ts

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

@ -802,11 +802,8 @@ export class PortfolioService {
const stakeRewards = getSum(
activities
.filter(({ SymbolProfile }) => {
return symbol === SymbolProfile.symbol;
})
.filter(({ type }) => {
return type === 'STAKE';
.filter(({ SymbolProfile, type }) => {
return symbol === SymbolProfile.symbol && type === 'STAKE';
})
.map(({ quantity }) => {
return new Big(quantity);

Loading…
Cancel
Save