diff --git a/src/libs/fetch.js b/src/libs/fetch.js index ab92a719..9b78b7b9 100644 --- a/src/libs/fetch.js +++ b/src/libs/fetch.js @@ -260,12 +260,12 @@ export default class ChainFetch { } async getGovernanceTally(pid, total, conf) { - return this.get(`/cosmos/gov/v1beta1/proposals/${pid}/tally`, conf).then(data => new ProposalTally().init(commonProcess(data), total)) + return this.get(`/cosmos/gov/v1beta1/proposals/${pid}/tally`, conf).then(data => new ProposalTally().init(commonProcess(data).tally, total)) } getGovernance(pid) { return this.get(`/cosmos/gov/v1beta1/proposals/${pid}`).then(data => { - const p = new Proposal().init(commonProcess(data), 0) + const p = new Proposal().init(commonProcess(data).proposal, 0) p.versionFixed(this.config.sdk_version) return p }) diff --git a/src/views/UptimeMyChainBlocks.vue b/src/views/UptimeMyChainBlocks.vue index 45ad2786..fb1c3980 100644 --- a/src/views/UptimeMyChainBlocks.vue +++ b/src/views/UptimeMyChainBlocks.vue @@ -83,7 +83,7 @@ import { import { getLocalChains, timeIn, toDay, } from '@/libs/utils' -import { Bech32, toHex } from '@cosmjs/encoding' +import { fromBech32, toBase64 } from '@cosmjs/encoding' export default { name: 'Blocks', @@ -134,8 +134,8 @@ export default { if (res.info) { res.info.forEach(x => { if (x.address) { - const hex = toHex(Bech32.decode(x.address).data).toUpperCase() - this.missing[hex] = x + const addr = toBase64(fromBech32(x.address).data) + this.missing[addr] = x } }) } diff --git a/src/views/components/OperationModal/index.vue b/src/views/components/OperationModal/index.vue index 6392c059..5cabd885 100644 --- a/src/views/components/OperationModal/index.vue +++ b/src/views/components/OperationModal/index.vue @@ -309,7 +309,7 @@ export default { accounts() { const accounts = getLocalAccounts() const selectedWallet = this.$store.state.chains.defaultWallet - return accounts[selectedWallet] + return accounts ? accounts[selectedWallet] : null }, isOwner() { if (this.accounts) {