fix issue
This commit is contained in:
parent
37eff20a6d
commit
b955949c66
@ -260,12 +260,12 @@ export default class ChainFetch {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getGovernanceTally(pid, total, conf) {
|
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) {
|
getGovernance(pid) {
|
||||||
return this.get(`/cosmos/gov/v1beta1/proposals/${pid}`).then(data => {
|
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)
|
p.versionFixed(this.config.sdk_version)
|
||||||
return p
|
return p
|
||||||
})
|
})
|
||||||
|
@ -83,7 +83,7 @@ import {
|
|||||||
import {
|
import {
|
||||||
getLocalChains, timeIn, toDay,
|
getLocalChains, timeIn, toDay,
|
||||||
} from '@/libs/utils'
|
} from '@/libs/utils'
|
||||||
import { Bech32, toHex } from '@cosmjs/encoding'
|
import { fromBech32, toBase64 } from '@cosmjs/encoding'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Blocks',
|
name: 'Blocks',
|
||||||
@ -134,8 +134,8 @@ export default {
|
|||||||
if (res.info) {
|
if (res.info) {
|
||||||
res.info.forEach(x => {
|
res.info.forEach(x => {
|
||||||
if (x.address) {
|
if (x.address) {
|
||||||
const hex = toHex(Bech32.decode(x.address).data).toUpperCase()
|
const addr = toBase64(fromBech32(x.address).data)
|
||||||
this.missing[hex] = x
|
this.missing[addr] = x
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -309,7 +309,7 @@ export default {
|
|||||||
accounts() {
|
accounts() {
|
||||||
const accounts = getLocalAccounts()
|
const accounts = getLocalAccounts()
|
||||||
const selectedWallet = this.$store.state.chains.defaultWallet
|
const selectedWallet = this.$store.state.chains.defaultWallet
|
||||||
return accounts[selectedWallet]
|
return accounts ? accounts[selectedWallet] : null
|
||||||
},
|
},
|
||||||
isOwner() {
|
isOwner() {
|
||||||
if (this.accounts) {
|
if (this.accounts) {
|
||||||
|
Loading…
Reference in New Issue
Block a user