Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
supportsSubscriptions method added to providers
  • Loading branch information
nivida committed Oct 8, 2019
commit b99e156600e9730152eebbf4b765b0eb96373205
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;