@bitski/provider-engine
Advanced tools
Comparing version 0.6.1 to 0.6.2
@@ -10,2 +10,3 @@ import BaseProvider, { JSONRPCRequest, JSONRPCResponse, JSONRPCResponseHandler } from './base-provider'; | ||
disableBlockTracking?: boolean; | ||
debug?: boolean; | ||
} | ||
@@ -12,0 +13,0 @@ export default class Web3ProviderEngine extends BaseProvider { |
@@ -56,3 +56,9 @@ "use strict"; | ||
_this._blockTracker.on('latest', _this.emit.bind(_this, 'latest')); | ||
_this._blockTracker.on('error', _this.emit.bind(_this, 'error')); | ||
// Handle errors instead of re-emitting, since they will throw otherwise | ||
_this._blockTracker.on('error', function (error) { | ||
// Ignore errors from the block tracker unless debug is enabled | ||
if (opts.debug) { | ||
console.log('DEBUG: ' + error.message); | ||
} | ||
}); | ||
// set initialization blocker | ||
@@ -59,0 +65,0 @@ _this._ready = new stoplight_1.default(); |
@@ -56,3 +56,6 @@ "use strict"; | ||
BlockTracker.prototype.fetchLatest = function () { | ||
return this._blockTracker.checkForLatestBlock(); | ||
var _this = this; | ||
return this._blockTracker.checkForLatestBlock().catch(function (error) { | ||
_this.emit('error', error); | ||
}); | ||
}; | ||
@@ -59,0 +62,0 @@ BlockTracker.prototype.createSubscriptions = function () { |
{ | ||
"name": "@bitski/provider-engine", | ||
"version": "0.6.1", | ||
"version": "0.6.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/BitskiCo/provider-engine", |
@@ -13,2 +13,3 @@ import eachSeries from 'async/eachSeries'; | ||
disableBlockTracking?: boolean; | ||
debug?: boolean; | ||
} | ||
@@ -58,4 +59,11 @@ | ||
this._blockTracker.on('latest', this.emit.bind(this, 'latest')); | ||
this._blockTracker.on('error', this.emit.bind(this, 'error')); | ||
// Handle errors instead of re-emitting, since they will throw otherwise | ||
this._blockTracker.on('error', (error) => { | ||
// Ignore errors from the block tracker unless debug is enabled | ||
if (opts.debug) { | ||
console.log('DEBUG: ' + error.message); | ||
} | ||
}); | ||
// set initialization blocker | ||
@@ -62,0 +70,0 @@ this._ready = new Stoplight(); |
@@ -99,3 +99,5 @@ import PollingBlockTracker from 'eth-block-tracker'; | ||
public fetchLatest(): Promise<any> { | ||
return this._blockTracker.checkForLatestBlock(); | ||
return this._blockTracker.checkForLatestBlock().catch((error) => { | ||
this.emit('error', error); | ||
}); | ||
} | ||
@@ -102,0 +104,0 @@ |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances 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
2057332
166
59537
9
12