tendermint
Advanced tools
Comparing version 3.0.3 to 3.1.0
@@ -71,3 +71,5 @@ 'use strict'; | ||
_this.synced = _this.handleError(_this.initialSync()); | ||
_this.handleError(_this.initialSync()).then(function () { | ||
return _this.emit('synced'); | ||
}); | ||
return _this; | ||
@@ -81,6 +83,5 @@ } | ||
promise.catch(function (err) { | ||
return promise.catch(function (err) { | ||
return _this2.emit('error', err); | ||
}); | ||
return promise; | ||
} | ||
@@ -87,0 +88,0 @@ }, { |
{ | ||
"name": "tendermint", | ||
"version": "3.0.3", | ||
"version": "3.1.0", | ||
"description": "A light client which talks to your Tendermint node over RPC", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -50,8 +50,8 @@ let old = require('old') | ||
this.synced = this.handleError(this.initialSync()) | ||
this.handleError(this.initialSync()) | ||
.then(() => this.emit('synced')) | ||
} | ||
handleError (promise) { | ||
promise.catch((err) => this.emit('error', err)) | ||
return promise | ||
return promise.catch((err) => this.emit('error', err)) | ||
} | ||
@@ -58,0 +58,0 @@ |
1
x.js
@@ -16,3 +16,4 @@ let node = require('.')('ws://localhost:46657', { | ||
node.on('synced', (header) => console.log('synced')) | ||
node.on('update', (header) => console.log(header.height)) | ||
node.on('error', (err) => console.error(err.stack)) |
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
118449
1433