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
As identified in Web3 Issue 3573, when using both TruffleContract and web3 functions it is important that they have separate Provider objects.
In the browser, the injected web3 has a web3.currentProvider which is a MetamaskInpageProvider, but passing this same object to a TruffleContract's setProvider function seems likely to produce issues like that one identified in web3.
To address this, the MetamaskInpageProvider might benefit from a clone() function producing another copy of the object, so that there can be independent queues serving overlapping sequences of requests from calls to the web3 object directly + calls to TruffleContract objects.
The text was updated successfully, but these errors were encountered:
As identified in Web3 Issue 3573, when using both TruffleContract and web3 functions it is important that they have separate Provider objects.
In the browser, the injected
web3
has aweb3.currentProvider
which is a MetamaskInpageProvider, but passing this same object to a TruffleContract'ssetProvider
function seems likely to produce issues like that one identified in web3.To address this, the MetamaskInpageProvider might benefit from a clone() function producing another copy of the object, so that there can be independent queues serving overlapping sequences of requests from calls to the web3 object directly + calls to TruffleContract objects.
The text was updated successfully, but these errors were encountered: