bitagora-booth
Advanced tools
Comparing version 1.0.176 to 1.0.177
14
booth.js
@@ -25,3 +25,3 @@ /** | ||
BITAGORA_URL, BITAGORA_PREFIX, BITAGORA_FAMILY, BITAGORA_VERSION, | ||
getPollAddress, getPrechecksumVote, requestState, getNodeList, _hash, requestWithLink, getBallot, getVoteAddress, | ||
getPollAddress, getPrechecksumVote, requestState, getNodeList, _hash, requestURL, getBallot, getVoteAddress, | ||
validateVote } = require('bitagora-library'); | ||
@@ -74,4 +74,8 @@ const BASE58 = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'; | ||
let link = JSON.parse(response.body)['link']; | ||
requestWithLink(link).then((result) => { | ||
resolve(result); | ||
requestURL(link).then((result) => { | ||
if (Boolean(result) && Boolean(result.data)) { | ||
resolve(result.data[0]); | ||
} else { | ||
reject(false); | ||
} | ||
}).catch((e) => { | ||
@@ -174,4 +178,4 @@ reject(e); | ||
while (attempts < 3) { | ||
response = await requestWithLink(link); | ||
if (response.status == "COMMITTED" || response.status == "INVALID") break; | ||
response = await requestURL(link); | ||
if (response.data[0].status == "COMMITTED" || response.data[0].status == "INVALID") break; | ||
wait(2000 + attempts * 1000); | ||
@@ -178,0 +182,0 @@ attempts = attempts + 1; |
{ | ||
"name": "bitagora-booth", | ||
"version": "1.0.176", | ||
"version": "1.0.177", | ||
"license": "Apache-2.0", | ||
@@ -17,3 +17,3 @@ "author": "Ignasi Ribó, 2018", | ||
"dependencies": { | ||
"bitagora-library": "0.0.11", | ||
"bitagora-library": "0.0.12", | ||
"async": "2.6.0", | ||
@@ -20,0 +20,0 @@ "atob": "2.1.1", |
60205
2083
+ Addedbitagora-library@0.0.12(transitive)
- Removedbitagora-library@0.0.11(transitive)
Updatedbitagora-library@0.0.12