Merge pull request #320 from oxen-io/sort-sn-staked-list
Sorts the "MY STAKES" service node list alphabetically
This commit is contained in:
commit
fbc06a407b
|
@ -72,7 +72,14 @@ export default {
|
||||||
node.contributors.find(
|
node.contributors.find(
|
||||||
c => c.address === this.our_address && c.amount > 0
|
c => c.address === this.our_address && c.amount > 0
|
||||||
);
|
);
|
||||||
return nodes.filter(getOurContribution).map(n => {
|
return nodes
|
||||||
|
.filter(getOurContribution)
|
||||||
|
.sort((a, b) => {
|
||||||
|
if (a.service_node_pubkey < b.service_node_pubkey) return -1;
|
||||||
|
if (a.service_node_pubkey > b.service_node_pubkey) return 1;
|
||||||
|
return 0;
|
||||||
|
})
|
||||||
|
.map(n => {
|
||||||
const ourContribution = getOurContribution(n);
|
const ourContribution = getOurContribution(n);
|
||||||
return {
|
return {
|
||||||
...n,
|
...n,
|
||||||
|
|
Loading…
Reference in New Issue