Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bitagora-booth

Package Overview
Dependencies
Maintainers
1
Versions
178
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bitagora-booth - npm Package Compare versions

Comparing version 1.0.155 to 1.0.156

23

booth.js

@@ -207,24 +207,27 @@ /**

for (var i=0; i<apis.length; i++) {
let result = await postVote(bytes, apis[i]).catch(() => { });
let result = await postVote(bytes, apis[i]).catch(() => { return false });
console.log("Result from calling API "+apis[i]);
response = result;
if (Boolean(response)) {
if (result) {
console.log("Received response");
console.log(response);
if ( response.status == 'COMMITTED' ) {
console.log(result);
if ( result.status == 'COMMITTED' ) {
console.log("Submission committed");
response = result;
break;
} else if ( response.status == 'PENDING' ) {
} else if ( result.status == 'PENDING' ) {
console.log("Submission pending. Waiting for confirmation");
link = apis[i] + "/batch_statuses?id=" + response.id;
link = apis[i] + "/batch_statuses?id=" + result.id;
console.log(link);
response = await confirmSubmission(link);
response = await confirmSubmission(link).catch(() => { return { status: 'ERROR' } });
console.log("Confirmed submission response");
console.log(response);
if (Boolean(response) && Boolean(response.status) && (response.status == 'COMMITTED')) break;
} else if (response.status == 'INVALID' ) {
if (response.invalid_transactions[0].message == 'InvalidTransaction: Invalid Action: Vote already cast') response.status = 'COMMITTED';
} else if (result.status == 'INVALID' ) {
response = result;
if (response.invalid_transactions[0].message.indexOf('Vote already cast') != -1) response.status = 'COMMITTED';
console.log("Submission invalid. Breaking.");
break;
}
} else {
console.log("No response");
}

@@ -231,0 +234,0 @@ }

{
"name": "bitagora-booth",
"version": "1.0.155",
"version": "1.0.156",
"license": "Apache-2.0",

@@ -5,0 +5,0 @@ "author": "Ignasi Ribó, 2018",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc