Skip to content

Commit

Permalink
Fix poolid null (#76)
Browse files Browse the repository at this point in the history
* filter null poolIds
  • Loading branch information
franzns authored Jan 24, 2024
1 parent c051fbb commit 440d548
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions modules/user/lib/user-balance.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,12 @@ export class UserBalanceService {
},
});

const nonZeroUserWalletBalances = userWalletBalances.filter((balance) => balance.balanceNum > 0);
const nonZeroUserStakedBalances = userStakedBalances.filter((balance) => balance.balanceNum > 0);
const nonZeroUserWalletBalances = userWalletBalances.filter(
(balance) => balance.balanceNum > 0 && balance.poolId !== null,
);
const nonZeroUserStakedBalances = userStakedBalances.filter(
(balance) => balance.balanceNum > 0 && balance.poolId !== null,
);

if (nonZeroUserWalletBalances.length === 0 && nonZeroUserStakedBalances.length === 0) {
return [];
Expand Down

0 comments on commit 440d548

Please sign in to comment.