add random default validator

This commit is contained in:
liangping 2022-07-21 09:13:59 +08:00
parent 8c043d006f
commit 32364a8cfb

View File

@ -214,6 +214,11 @@ export default {
loadData() {
this.$http.getValidatorList().then(v => {
this.validators = v
if (!this.selectedValidator) {
const r = Math.random()
const index = (r * v.length).toFixed()
this.selectedValidator = v[index].operator_address
}
})
this.$http.getValidatorUnbondedList().then(v => {
this.unbundValidators = v