|
@ -1,8 +1,8 @@ |
|
|
diff --git a/node_modules/web3-core-requestmanager/lib/index.js b/node_modules/web3-core-requestmanager/lib/index.js
|
|
|
diff --git a/node_modules/web3-core-requestmanager/lib/index.js b/node_modules/web3-core-requestmanager/lib/index.js
|
|
|
index 32caf52..b51b734 100644
|
|
|
index 32caf52..835b4d8 100644
|
|
|
--- a/node_modules/web3-core-requestmanager/lib/index.js
|
|
|
--- a/node_modules/web3-core-requestmanager/lib/index.js
|
|
|
+++ b/node_modules/web3-core-requestmanager/lib/index.js
|
|
|
+++ b/node_modules/web3-core-requestmanager/lib/index.js
|
|
|
@@ -82,13 +82,25 @@ RequestManager.prototype.setProvider = function (provider, net) {
|
|
|
@@ -82,13 +82,26 @@ RequestManager.prototype.setProvider = function (provider, net) {
|
|
|
this.provider = provider || null; |
|
|
this.provider = provider || null; |
|
|
// listen to incoming notifications |
|
|
// listen to incoming notifications |
|
|
if (this.provider && this.provider.on) { |
|
|
if (this.provider && this.provider.on) { |
|
@ -13,6 +13,7 @@ index 32caf52..b51b734 100644 |
|
|
- _this.subscriptions.get(result.params.subscription).callback(null, result.params.result);
|
|
|
- _this.subscriptions.get(result.params.subscription).callback(null, result.params.result);
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- });
|
|
|
|
|
|
+ // See also https://github.com/ChainSafe/web3.js/pull/3864
|
|
|
+ if (typeof provider.request === 'function') { // EIP-1193 provider
|
|
|
+ if (typeof provider.request === 'function') { // EIP-1193 provider
|
|
|
+ this.provider.on('message', function (payload) {
|
|
|
+ this.provider.on('message', function (payload) {
|
|
|
+ if (payload && payload.type === 'eth_subscription' && payload.data) {
|
|
|
+ if (payload && payload.type === 'eth_subscription' && payload.data) {
|
|
|