From b328c62164672a83fef126e684f64111f3229791 Mon Sep 17 00:00:00 2001 From: Samuel Furter Date: Thu, 6 Sep 2018 14:57:44 +0200 Subject: [PATCH] clearSubscriptions fixed (#1886) --- packages/web3-shh/src/index.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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);