From acca0f1a0f9729cac2c18bffc9c3aad7835c9b08 Mon Sep 17 00:00:00 2001 From: liangping <18786721@qq.com> Date: Wed, 15 Sep 2021 19:49:57 +0800 Subject: [PATCH] Improve wallet operations --- src/views/Governance.vue | 2 + src/views/GovernanceProposalView.vue | 4 + src/views/OperationDelegateComponent.vue | 98 +++--- src/views/OperationRedelegateComponent.vue | 289 +++++++++--------- src/views/OperationTransferComponent.vue | 95 +++--- src/views/OperationUnbondComponent.vue | 250 +++++++-------- src/views/OperationVoteComponent.vue | 14 +- .../OperationWithdrawCommissionComponent.vue | 197 ++++++------ src/views/OperationWithdrawComponent.vue | 100 +++--- src/views/StakingValidator.vue | 23 -- 10 files changed, 538 insertions(+), 534 deletions(-) diff --git a/src/views/Governance.vue b/src/views/Governance.vue index 8934d81a..2a7fea56 100644 --- a/src/views/Governance.vue +++ b/src/views/Governance.vue @@ -110,12 +110,14 @@ :id="'vote-veto'+p.id" variant="danger" :value="p.tally.veto" + :label="`${p.tally.veto.toFixed()}%`" show-progress /> diff --git a/src/views/GovernanceProposalView.vue b/src/views/GovernanceProposalView.vue index f8405cfe..a69defc6 100644 --- a/src/views/GovernanceProposalView.vue +++ b/src/views/GovernanceProposalView.vue @@ -131,24 +131,28 @@ :id="'vote-yes'+proposal.id" variant="success" :value="proposal.tally.yes" + :label="`${proposal.tally.yes.toFixed()}%`" show-progress /> diff --git a/src/views/OperationDelegateComponent.vue b/src/views/OperationDelegateComponent.vue index a2aae832..7f19f71b 100644 --- a/src/views/OperationDelegateComponent.vue +++ b/src/views/OperationDelegateComponent.vue @@ -87,7 +87,8 @@ - + + - - + + - {{ errors[0] }} - - - - - {{ item.denom }} - - - {{ errors[0] }} - - + + + + + {{ errors[0] }} + + + + + + + Advance + - - + + + + + + {{ errors[0] }} + + + + Keplr @@ -201,17 +221,16 @@ v-model="wallet" name="wallet" value="ledgerUSB" - class="mb-1 mt-1" > - Ledger (USB) + Ledger(USB) - Ledger (Bluetooth) + Ledger(Bluetooth) {{ errors[0] }} @@ -237,7 +256,7 @@ import { ValidationProvider, ValidationObserver } from 'vee-validate' import { BModal, BRow, BCol, BInputGroup, BFormInput, BFormGroup, BFormSelect, BFormSelectOption, - BForm, BFormRadioGroup, BFormRadio, BButton, BInputGroupAppend, + BForm, BFormRadioGroup, BFormRadio, BButton, BInputGroupAppend, BFormCheckbox, } from 'bootstrap-vue' import { required, email, url, between, alpha, integer, password, min, digits, alphaDash, length, @@ -262,6 +281,7 @@ export default { BFormSelectOption, BFormRadioGroup, BFormRadio, + BFormCheckbox, vSelect, BButton, BInputGroupAppend, @@ -297,10 +317,12 @@ export default { memo: '', fee: '800', feeDenom: '', - wallet: 'keplr', + wallet: 'ledgerUSB', error: null, sequence: 1, accountNumber: 0, + advance: false, + gas: '200000', required, password, @@ -447,7 +469,7 @@ export default { denom: this.feeDenom, }, ], - gas: '200000', + gas: this.gas, } const signerData = { diff --git a/src/views/OperationRedelegateComponent.vue b/src/views/OperationRedelegateComponent.vue index e84fdcc6..619e969c 100644 --- a/src/views/OperationRedelegateComponent.vue +++ b/src/views/OperationRedelegateComponent.vue @@ -7,6 +7,7 @@ title="Redelegate Token" hide-header-close scrollable + ok-title="Send" :ok-disabled="!selectedAddress" @hidden="resetModal" @ok="handleOk" @@ -25,13 +26,9 @@ rules="required" name="Delegator" > - {{ errors[0] }} @@ -45,14 +42,36 @@ label-for="validator" > + + + + + + {{ errors[0] }} + + + + - - - - - {{ errors[0] }} - - - - - + + + + {{ printDenom() }} + + {{ errors[0] }} @@ -117,39 +121,58 @@ label="Fee" label-for="Fee" > - - + + - {{ errors[0] }} - - - - - {{ item.denom }} - - - {{ errors[0] }} - - + + + + + {{ errors[0] }} + + + + + + + Advance + - - + + + + + + {{ errors[0] }} + + + + - Keplr @@ -197,17 +219,16 @@ v-model="wallet" name="wallet" value="ledgerUSB" - class="mb-1 mt-1" > - Ledger (USB) + Ledger(USB) - Ledger (Bluetooth) + Ledger(Bluetooth) {{ errors[0] }} @@ -225,16 +246,15 @@