Socket
Socket
Sign inDemoInstall

@bitski/provider-engine

Package Overview
Dependencies
Maintainers
3
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bitski/provider-engine - npm Package Compare versions

Comparing version 0.6.1 to 0.6.2

dist/es5/index.js

1

dist/provider-engine.d.ts

@@ -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();

5

dist/util/block-tracker.js

@@ -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 @@

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