Implement batch voting
This commit is contained in:
@@ -20,10 +20,15 @@ export default Controller.extend({
|
||||
proposalsOpenSorted: sort('proposalsOpen', 'proposalsSorting'),
|
||||
|
||||
actions: {
|
||||
confirmProposal(proposalId) {
|
||||
this.kredits.vote(proposalId).then(transaction => {
|
||||
window.confirm('Vote submitted to Ethereum blockhain: '+transaction.hash);
|
||||
});
|
||||
confirmProposals(proposalIds) {
|
||||
if (this.kredits.currentUser.isCore) {
|
||||
this.kredits.batchVote(proposalIds)
|
||||
.then((transaction) => {
|
||||
window.confirm('Vote submitted to Ethereum blockhain: '+transaction.hash);
|
||||
});
|
||||
} else {
|
||||
window.alert('Only members can vote on proposals. Please ask someone to set you up.');
|
||||
}
|
||||
},
|
||||
|
||||
save(contributor) {
|
||||
|
||||
Reference in New Issue
Block a user