Reset selectedProposals after confirmation
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import Controller from '@ember/controller';
|
||||
import { alias, filter, filterBy, sort } from '@ember/object/computed';
|
||||
import { inject as injectService } from '@ember/service';
|
||||
import RSVP from 'rsvp';
|
||||
|
||||
export default Controller.extend({
|
||||
kredits: injectService(),
|
||||
@@ -22,12 +23,14 @@ export default Controller.extend({
|
||||
actions: {
|
||||
confirmProposals(proposalIds) {
|
||||
if (this.kredits.currentUser.isCore) {
|
||||
this.kredits.batchVote(proposalIds)
|
||||
return this.kredits.batchVote(proposalIds)
|
||||
.then((transaction) => {
|
||||
window.confirm('Vote submitted to Ethereum blockhain: '+transaction.hash);
|
||||
return transaction;
|
||||
});
|
||||
} else {
|
||||
window.alert('Only members can vote on proposals. Please ask someone to set you up.');
|
||||
return RSVP.reject();
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user