fixed tally issue
This commit is contained in:
parent
91cda46e9a
commit
7a3c64981c
@ -260,18 +260,9 @@ export default {
|
|||||||
updateTally(res) {
|
updateTally(res) {
|
||||||
const voting = res.filter(i => i.status === 2)
|
const voting = res.filter(i => i.status === 2)
|
||||||
if (voting.length > 0) {
|
if (voting.length > 0) {
|
||||||
let i = 0
|
voting.forEach(p => this.$http.getGovernanceTally(p.id, 0).then(update => {
|
||||||
Promise.all(voting.reverse().map(p => this.$http.getGovernanceTally(p.id, 0))).then(update => {
|
this.$set(p, 'tally', update)
|
||||||
this.proposals.map(x => {
|
}))
|
||||||
if (x.status === 2) {
|
|
||||||
const xh = x
|
|
||||||
xh.tally = update[i]
|
|
||||||
i += 1
|
|
||||||
return xh
|
|
||||||
}
|
|
||||||
return x
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user