truffle-box / react-box

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

Enable user to approve access if privacy mode is on #79

Closed joshma91 closed 6 years ago

joshma91 commented 6 years ago

Fixes #74

Add new MetaMask ethereum.enable() method to approve accounts access if user has turned on new privacy option in Metamask (EIP-1102).

Tested with MetaMask 4.16.0

Reference: https://medium.com/metamask/https-medium-com-metamask-breaking-change-injecting-web3-7722797916a8?fbclid=IwAR3ZdRRUyvQ7AMvn3BaVC0_XIoGreK5_LguZJuiTMVzCbWKja0PAjhH8kbw