Skip to content

Commit

Permalink
Merge pull request #169 from MickWang/master
Browse files Browse the repository at this point in the history
fix search my stake records error display issue
  • Loading branch information
MickWang authored Jun 26, 2019
2 parents 84b9b0c + 74efae4 commit 7663494
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/renderer/store/modules/NodeAuthorization.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,17 @@ async function matchNodeName(list) {
}
for(const item of list) {
for (const cnode of nodes) {
if (!cnode || !cnode.PublicKey) {
item.name = 'Node_' + (item.address.toBase58 ? item.address.toBase58().substr(0, 6) : item.address.substr(0, 6));
}
else if (cnode.PublicKey === item.pk || cnode.PublicKey === item.peerPubkey) {
if (cnode.PublicKey === item.pk || cnode.PublicKey === item.peerPubkey) {
item.name = cnode.Name
break;
}
else if (!cnode || !cnode.PublicKey) {
if (item.address) {
item.name = 'Node_' + (item.address.toBase58 ? item.address.toBase58().substr(0, 6) : item.address.substr(0, 6));
} else {
item.name = 'Node_' + item.pk.substr(0, 6)
}
}
}
}
}
Expand Down

0 comments on commit 7663494

Please sign in to comment.