You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a transaction is sent, web3 chooses to either poll for a receipt, or subscribe to new blocks. However, it makes this decision by checking if on is a property of the provider:
This means if a project is using a provider that includes on, such as web3-provider-engine, it will incorrectly try to subscribe. This can cause errors when sending a transaction:
The workaround I've used is to remove on from a provider, however I imagine this may break some providers or apps.
I'm not sure what the correct way is to determine whether a provider supports subscriptions is, maybe this needs to be addressed in the provider spec/API?
The text was updated successfully, but these errors were encountered:
Thanks @cgewecke, I'm using web3-provider-engine@15.0.6
I also had the same problem while building burner-wallet/burner-connect-provider. I wanted to implement the EventEmitter interface, but had to remove on as well:
When a transaction is sent, web3 chooses to either poll for a receipt, or subscribe to new blocks. However, it makes this decision by checking if
on
is a property of the provider:https://github.com/ethereum/web3.js/blob/af6472976c23cb61c05e925eebe5734d141384f4/packages/web3-core-method/src/index.js#L515-L521
This means if a project is using a provider that includes
on
, such as web3-provider-engine, it will incorrectly try to subscribe. This can cause errors when sending a transaction:The workaround I've used is to remove
on
from a provider, however I imagine this may break some providers or apps.I'm not sure what the correct way is to determine whether a provider supports subscriptions is, maybe this needs to be addressed in the provider spec/API?
The text was updated successfully, but these errors were encountered: