bitagora-booth
Advanced tools
Comparing version 1.0.153 to 1.0.154
@@ -181,4 +181,2 @@ /** | ||
if (Boolean(opt) && Boolean(opt['filter'])) url = url + "?address="+opt['filter'] | ||
console.log("Requesting state at address"); | ||
console.log(url); | ||
request.get({ url: url }, | ||
@@ -194,3 +192,2 @@ (err, response) => { | ||
} else if (type == 'polls') { | ||
console.log("In polls"); | ||
let polls = []; | ||
@@ -279,20 +276,11 @@ for (var i=0; i<json.data.length; i++) { | ||
function getBallot(ballot, poll, 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"); | ||
if (Object.keys(poll.values).indexOf(ballot) == -1 ) throw 'Ballot not valid'; | ||
let encrypted = encryptBallot(ballot, poll.certkey, voterPrivkeyHex); | ||
consoole.log("Encrypted is"); | ||
console.log(encrypted); | ||
return encrypted; | ||
} | ||
} catch(e) { | ||
console.log("Error returning undefined"); | ||
console.log(e); | ||
@@ -319,4 +307,2 @@ return undefined; | ||
if (type != 'polls' && type != 'ballots' && !Boolean(address)) throw 'No address'; | ||
console.log(address); | ||
console.log(opt); | ||
if (process.env.API_URL !== undefined) { | ||
@@ -323,0 +309,0 @@ requestStateFromAPI(process.env.API_URL, address, type, opt).then((result) => { |
{ | ||
"name": "bitagora-booth", | ||
"version": "1.0.153", | ||
"version": "1.0.154", | ||
"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
76796
2899