forked from LaconicNetwork/cosmos-explorer
update tally for ongoing proposals
This commit is contained in:
1 parent
b5183e7214
commit
30e8a354bc
2 files changed
+11
-7
No files matched your search
@@ -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
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user