Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable clone() #52

Open
wbt opened this issue Jun 9, 2020 · 0 comments
Open

Enable clone() #52

wbt opened this issue Jun 9, 2020 · 0 comments

Comments

@wbt
Copy link

wbt commented Jun 9, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant