forked from cerc-io/cosmos-explorer
update tally for ongoing proposals
This commit is contained in:
parent
b5183e7214
commit
30e8a354bc
@ -80,12 +80,14 @@ export default {
|
||||
})
|
||||
},
|
||||
updateTally(res) {
|
||||
const voting = res.filter(i => i.status === 2)
|
||||
if (voting.length > 0) {
|
||||
voting.forEach(p => this.$http.getGovernanceTally(p.id, 0).then(update => {
|
||||
this.$set(p, 'tally', update)
|
||||
}))
|
||||
}
|
||||
this.$http.getStakingPool().then(pool => {
|
||||
const voting = res.filter(i => i.status === 2)
|
||||
if (voting.length > 0) {
|
||||
voting.forEach(p => this.$http.getGovernanceTally(p.id, pool.bondedToken).then(update => {
|
||||
this.$set(p, 'tally', update)
|
||||
}))
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -367,7 +367,9 @@ export default {
|
||||
|
||||
this.$http.getGovernance(pid).then(p => {
|
||||
if (p.status === 2) {
|
||||
this.$http.getGovernanceTally(pid, 0).then(t => p.updateTally(t))
|
||||
this.$http.getStakingPool().then(pool => {
|
||||
this.$http.getGovernanceTally(pid, pool.bondedToken).then(t => p.updateTally(t))
|
||||
})
|
||||
}
|
||||
this.proposal = p
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user