diff --git a/src/libs/data/data.js b/src/libs/data/data.js index 9cf69c0e..deea84ef 100644 --- a/src/libs/data/data.js +++ b/src/libs/data/data.js @@ -129,7 +129,7 @@ export async function sign(device, chainId, signerAddress, messages, fee, memo, // Ensure the address has some tokens to spend const client = await SigningStargateClient.offline(signer) - return client.signAmino(toSignAddress(signerAddress), messages, fee, memo, signerData) + return client.signAmino(device === 'keplr' ? signerAddress : toSignAddress(signerAddress), messages, fee, memo, signerData) // return signDirect(signer, signerAddress, messages, fee, memo, signerData) } diff --git a/src/views/OperationDelegateComponent.vue b/src/views/OperationDelegateComponent.vue index 8b51ee91..f915996b 100644 --- a/src/views/OperationDelegateComponent.vue +++ b/src/views/OperationDelegateComponent.vue @@ -481,13 +481,13 @@ export default { sign( this.wallet, this.chainId, - this.address, + this.selectedAddress, txMsgs, txFee, this.memo, signerData, ).then(bodyBytes => { - this.$http.broadcastTx(bodyBytes, this.selectedChain).then(res => { + this.$http.broadcastTx(bodyBytes).then(res => { setLocalTxHistory({ op: 'delegate', hash: res.tx_response.txhash, time: new Date() }) this.$bvModal.hide('delegate-window') this.$toast({ diff --git a/src/views/OperationUnbondComponent.vue b/src/views/OperationUnbondComponent.vue index 47467fba..1c0f0178 100644 --- a/src/views/OperationUnbondComponent.vue +++ b/src/views/OperationUnbondComponent.vue @@ -8,7 +8,7 @@ hide-header-close scrollable ok-title="Send" - :ok-disabled="!selectedAddress" + :ok-disabled="!address" @hidden="resetModal" @ok="handleOk" @show="loadBalance" @@ -270,7 +270,6 @@ export default { }, data() { return { - selectedAddress: this.address, availableAddress: [], validators: [], selectedValidator: this.validatorAddress, @@ -310,7 +309,7 @@ export default { }, tokenOptions() { if (!this.delegations) return [] - return this.delegations.filter(x => x.delegation.validator_address === this.selectedValidator).map(x => ({ value: x.balance.denom, label: formatToken(x.balance) })) + return this.delegations.filter(x => x.delegation.validator_address === this.validatorAddress).map(x => ({ value: x.balance.denom, label: formatToken(x.balance) })) }, feeDenoms() { if (!this.balance) return [] @@ -335,7 +334,7 @@ export default { this.balance = res } }) - this.$http.getLatestBlock(this.selectedChain).then(ret => { + this.$http.getLatestBlock().then(ret => { this.chainId = ret.block.header.chain_id const notSynced = timeIn(ret.block.header.time, 10, 'm') if (notSynced) { @@ -344,7 +343,7 @@ export default { this.error = null } }) - this.$http.getAuthAccount(this.selectedAddress, this.selectedChain).then(ret => { + this.$http.getAuthAccount(this.address).then(ret => { if (ret.value.base_vesting_account) { this.accountNumber = ret.value.base_vesting_account.base_account.account_number this.sequence = ret.value.base_vesting_account.base_account.sequence @@ -354,7 +353,7 @@ export default { this.sequence = ret.value.sequence ? ret.value.sequence : 0 } }) - this.$http.getStakingDelegations(this.selectedAddress).then(res => { + this.$http.getStakingDelegations(this.address).then(res => { this.delegations = res.delegation_responses this.delegations.forEach(x => { if (x.delegation.validator_address === this.validatorAddress) {