Skip to content

Commit

Permalink
supportsSubscriptions method added to providers
Browse files Browse the repository at this point in the history
  • Loading branch information
nivida committed Oct 8, 2019
1 parent 8840209 commit b99e156
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/web3-providers-http/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,5 +120,8 @@ HttpProvider.prototype.disconnect = function () {
//NO OP
};

HttpProvider.prototype.supportsSubscriptions = function () {
return false;
};

module.exports = HttpProvider;
7 changes: 7 additions & 0 deletions packages/web3-providers-ipc/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,5 +311,12 @@ IpcProvider.prototype.reset = function () {
this.addDefaultEvents();
};

/**
* @returns {boolean}
*/
IpcProvider.prototype.supportsSubscriptions = function () {
return true;
};

module.exports = IpcProvider;

7 changes: 7 additions & 0 deletions packages/web3-providers-ws/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -404,4 +404,11 @@ WebsocketProvider.prototype.disconnect = function () {
}
};

/**
* @returns {boolean}
*/
WebsocketProvider.prototype.supportsSubscriptions = function () {
return true;
};

module.exports = WebsocketProvider;

0 comments on commit b99e156

Please sign in to comment.