sort validators
This commit is contained in:
parent
443e469a0d
commit
2ba6f8b39d
@ -83,6 +83,7 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
uptime() {
|
uptime() {
|
||||||
const vals = this.query ? this.validators.filter(x => String(x.description.moniker).indexOf(this.query) > -1) : this.validators
|
const vals = this.query ? this.validators.filter(x => String(x.description.moniker).indexOf(this.query) > -1) : this.validators
|
||||||
|
vals.sort((a, b) => b.delegator_shares - a.delegator_shares)
|
||||||
return vals.map(x => ({
|
return vals.map(x => ({
|
||||||
validator: x.description,
|
validator: x.description,
|
||||||
address: consensusPubkeyToHexAddress(x.consensus_pubkey),
|
address: consensusPubkeyToHexAddress(x.consensus_pubkey),
|
||||||
|
Loading…
Reference in New Issue
Block a user