From 32364a8cfb6f504c08f9215aa91ba36817d1cc63 Mon Sep 17 00:00:00 2001 From: liangping <18786721@qq.com> Date: Thu, 21 Jul 2022 09:13:59 +0800 Subject: [PATCH] add random default validator --- src/views/components/OperationModal/components/Delegate.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/views/components/OperationModal/components/Delegate.vue b/src/views/components/OperationModal/components/Delegate.vue index 8f31ede5..4d32d812 100644 --- a/src/views/components/OperationModal/components/Delegate.vue +++ b/src/views/components/OperationModal/components/Delegate.vue @@ -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