bitagora-booth
Advanced tools
Comparing version 1.0.142 to 1.0.143
@@ -249,2 +249,3 @@ /** | ||
var newVote = new Vote(ballot, context.poll); | ||
if (!newVote.ballot) throw 'Ballot is not valid'; | ||
console.log("New vote"); | ||
@@ -251,0 +252,0 @@ console.log(newVote); |
@@ -258,8 +258,19 @@ /** | ||
function getBallot(ballot, poll, voterPrivkeyHex) { | ||
if (poll.open) { | ||
return ballot; | ||
} else { | ||
console.log("Encrypting ballot"); | ||
console.log(encryptBallot(ballot, poll.certkey, voterPrivkeyHex)); | ||
return encryptBallot(ballot, poll.certkey, voterPrivkeyHex); | ||
console.log("In get ballot"); | ||
console.log(ballot); | ||
console.log(poll); | ||
console.log("Poll is open? "+poll.open.toString()); | ||
try { | ||
if (poll.open) { | ||
console.log("Returning unencrypted ballot"); | ||
return ballot; | ||
} else { | ||
console.log("Encrypting ballot"); | ||
let encrypted = encryptBallot(ballot, poll.certkey, voterPrivkeyHex); | ||
console.log(encrypted); | ||
return encrypted; | ||
} | ||
} catch(e) { | ||
console.log(e); | ||
return false; | ||
} | ||
@@ -266,0 +277,0 @@ } |
{ | ||
"name": "bitagora-booth", | ||
"version": "1.0.142", | ||
"version": "1.0.143", | ||
"license": "Apache-2.0", | ||
@@ -5,0 +5,0 @@ "author": "Ignasi Ribó, 2018", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
76094
2878