truffle-box / react-box

Truffle, Webpack and React boilerplate.
https://truffle-box.github.io/
MIT License
736 stars 251 forks source link

Fix problem with getWeb3() returned API consistency #99

Closed scorpion9979 closed 5 years ago

scorpion9979 commented 5 years ago

window.web3 does not always provide a consistent API. I've had several issues with this on mobile dApp browsers, since it was returning an older version of web3 with different API. The solution is to use new Web3(Web3.currentProvider) instead, where Web3 is the one imported from the dependencies, not the one in the window.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 5 years ago

This issue has been closed, but can be re-opened if further comments indicate that the problem persists. Feel free to tag maintainers if there is no reply to further comments.