diff --git a/packages/web3-shh/src/index.js b/packages/web3-shh/src/index.js index d723d884ff9..740e62e764a 100644 --- a/packages/web3-shh/src/index.js +++ b/packages/web3-shh/src/index.js @@ -42,11 +42,8 @@ var Shh = function Shh() { _this.net.setProvider.apply(_this, arguments); }; - this.clearSubscriptions = _this._requestManager.clearSubscriptions; - this.net = new Net(this.currentProvider); - [ new Subscriptions({ name: 'subscribe', @@ -180,6 +177,10 @@ var Shh = function Shh() { }); }; +Shh.prototype.clearSubscriptions = function () { + this._requestManager.clearSubscriptions(); +}; + core.addProviders(Shh);