fix issue
This commit is contained in:
parent
37eff20a6d
commit
b955949c66
@ -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
|
||||
})
|
||||
|
@ -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
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user