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