open-bounty icon indicating copy to clipboard operation
open-bounty copied to clipboard

MetaMask: Use web3.currentProvider instead of window.web3

Open vitvly opened this issue 7 years ago • 5 comments

Summary

When browsing Open Bounty website with MetaMask on, it complains in Console that

MetaMask: web3 will be deprecated in the near future in favor of the ethereumProvider 
https://github.com/MetaMask/faq/blob/master/detecting_metamask.md#web3-deprecation

Solution

Following the above given document, use web3.currentProvider instead of window.web3 when calling MetaMask in application code.

vitvly avatar Jan 30 '18 14:01 vitvly

Current balance: 0.0 ETH Tokens: SNT: 240.00 Contract address: 0x78fb1c9c203d1f3d0ea421a7bdaf61ae6d9b5a52 QR Code Network: Mainnet To claim this bounty sign up at https://openbounty.status.im and make sure to update your Ethereum address in My Payment Details so that the bounty is correctly allocated. To fund it, send ETH or ERC20/ERC223 tokens to the contract address.

status-open-bounty avatar Feb 08 '18 13:02 status-open-bounty

This should be super easy to fix by upgrading cljs-web3 to 0.19.0-0-11 and replacing the web3 constructor we defined here: https://github.com/status-im/open-bounty/blob/b76ad70766e7d521f2df0c0ee3d7d59d533fd399/src/cljs/commiteth/common.cljs#L10-L11

with the one that has been added to cljs-web3 in this PR: https://github.com/district0x/cljs-web3/pull/8

martinklepsch avatar Apr 10 '18 16:04 martinklepsch

do we need to fix this anywhere else?

debragail avatar May 29 '18 05:05 debragail

I think this was fixed?

debragail avatar Sep 04 '18 07:09 debragail

To be revoked @andytudhope

pablanopete avatar Sep 11 '18 00:09 pablanopete