Skip to content
This repository has been archived by the owner on Jul 22, 2020. It is now read-only.

Commit

Permalink
feat: simplify voteAccount find
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnygleason committed Sep 12, 2019
1 parent b506fe1 commit 536e3fa
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions api/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -631,14 +631,8 @@ async function getClusterInfo() {
});

node.voteStatus =
(voteAccounts &&
voteAccounts.current.find(x => {
return x.nodePubkey === nodePubkey;
})) ||
(voteAccounts &&
voteAccounts.delinquent.find(x => {
return x.nodePubkey === nodePubkey;
}));
voteAccounts.current.find(x => x.nodePubkey === nodePubkey) ||
voteAccounts.delinquent.find(x => x.nodePubkey === nodePubkey);
node.activatedStake = node.voteStatus && node.voteStatus.activatedStake;
node.commission = node.voteStatus && node.voteStatus.commission;
}
Expand Down

0 comments on commit 536e3fa

Please sign in to comment.