AMOUNT
@@ -33,11 +33,23 @@
Congratulations! Transfer completed successfully.
+
+ {{ error }}
+
+
+ Processing...
+
-
-
-
-
@@ -99,11 +91,7 @@ import {
formatToken, getCachedValidators, getLocalAccounts, getLocalChains, tokenFormatter,
} from '@/libs/utils'
import FeatherIcon from '@/@core/components/feather-icon/FeatherIcon.vue'
-
-import OperationWithdrawComponent from './OperationWithdrawComponent.vue'
-import OperationUnbondComponent from './OperationUnbondComponent.vue'
-import OperationDelegateComponent from './OperationDelegateComponent.vue'
-import OperationRedelegateComponent from './OperationRedelegateComponent.vue'
+import OperationModal from '@/views/components/OperationModal/index.vue'
export default {
components: {
@@ -113,11 +101,7 @@ export default {
BTable,
BCard,
FeatherIcon,
-
- OperationWithdrawComponent,
- OperationDelegateComponent,
- OperationRedelegateComponent,
- OperationUnbondComponent,
+ OperationModal,
},
directives: {
'b-tooltip': VBTooltip,
@@ -153,6 +137,7 @@ export default {
accounts: [],
delegations: [],
rewards: {},
+ operationModalType: '',
}
},
computed: {
@@ -200,7 +185,8 @@ export default {
this.init()
},
methods: {
- selectValue(v) {
+ selectValue(type, v) {
+ this.operationModalType = type
this.address = v.delegator_address
this.selectedValidator = v.validator.validator
return v
diff --git a/src/views/components/OperationModal/TransactionResult.vue b/src/views/components/OperationModal/TransactionResult.vue
index b3499815..31fb8266 100644
--- a/src/views/components/OperationModal/TransactionResult.vue
+++ b/src/views/components/OperationModal/TransactionResult.vue
@@ -137,6 +137,7 @@ export default {
if (res.code === 0) {
this.succeed = true
clearInterval(this.timer)
+ window.location.reload()
} else if (res.code !== 3) { // code 3 is tx unconfirmed(not founded).
this.error = res.raw_log
console.log('error:', this.error)
diff --git a/src/views/components/OperationModal/components/Delegate.vue b/src/views/components/OperationModal/components/Delegate.vue
index bc4138c2..f806d552 100644
--- a/src/views/components/OperationModal/components/Delegate.vue
+++ b/src/views/components/OperationModal/components/Delegate.vue
@@ -151,7 +151,7 @@ export default {
availableAddress: [],
validators: [],
unbundValidators: [],
- selectedValidator: null,
+ selectedValidator: this.validatorAddress,
token: '',
amount: null,
selectedChain: '',
diff --git a/src/views/components/OperationModal/index.vue b/src/views/components/OperationModal/index.vue
index 28805e26..279d860a 100644
--- a/src/views/components/OperationModal/index.vue
+++ b/src/views/components/OperationModal/index.vue
@@ -1,6 +1,6 @@