Skip to content
Snippets Groups Projects
Commit ff69d507 authored by Cédric Moreau's avatar Cédric Moreau
Browse files

Voters no more need to be members

parent f738183f
No related branches found
No related tags found
No related merge requests found
......@@ -27,16 +27,16 @@ module.exports = function (currency) {
// Verify content and signature
vote.verify(currency, next);
},
// Issuer is a member
function (verified, next){
vote.issuerIsMember(next);
},
function (isMember, next){
if(!isMember && vote.amendment.number != 0){
next('Only members may be voters');
Amendment.current(function (err, am) {
var currNumber = am ? parseInt(am.number) : -1;
var voteNumber = parseInt(vote.basis)
if(voteNumber > currNumber + 1){
next('Previous amendment not found, cannot record vote for amendment #' + vote.basis);
return;
}
next();
});
},
// Issuer is a voter
function (next){
......@@ -49,17 +49,6 @@ module.exports = function (currency) {
}
next();
},
function (next){
Amendment.current(function (err, am) {
var currNumber = am ? parseInt(am.number) : -1;
var voteNumber = parseInt(vote.basis)
if(voteNumber > currNumber + 1){
next('Previous amendment not found, cannot record vote for amendment #' + vote.basis);
return;
}
next();
});
},
function (next){
if(parseInt(vote.basis) > 0){
// Check if previous votes tree matches
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment