web3-react icon indicating copy to clipboard operation
web3-react copied to clipboard

V8 compatibility with Web3js?

Open williamkmlau opened this issue 3 years ago • 9 comments

In V6, if we wanted to use Web3js, one could simply use new Web3(provider) instead of Web3Provider(provider) inside the getLibrary(provider: any) function to use our convenience library of choice.

In V8, with the library creation function removed, it seems to assume we will be using Ethers project since the returned provider is an Ethers project Web3Provider.

I am unsure how to use Web3js library instead.

williamkmlau avatar May 03 '22 14:05 williamkmlau

since web3-react is based on ethers, it's not recommended to mix it together with web3.js. Use ethers instead

v1rtl avatar May 04 '22 19:05 v1rtl

It seems like V8 is a downgrade since V6 had more flexibility now breaking things. I prefer web3 as well.

Lucienest avatar May 30 '22 09:05 Lucienest

Just spent 2 hours going round in circles with this same issue. 😢

ThisIsRuddy avatar Jun 06 '22 00:06 ThisIsRuddy

@ThisIsRuddy just use ethers Web3Provider instead of web3js

v1rtl avatar Jun 06 '22 09:06 v1rtl

It would be better if it could support web3js🌹🌹

0xhhhhh avatar Jun 07 '22 15:06 0xhhhhh

@ThisIsRuddy just use ethers Web3Provider instead of web3js

V6 supports web3js, and now it doesn't. many prefer web3, not ethers.

All we want is web3js support on V8, as V6.

Lucienest avatar Jun 07 '22 16:06 Lucienest

Downgraded to v6 back to working now 👌and kept a v8 branch stashed incase Web3 support in v8 happens... 😅

ThisIsRuddy avatar Jun 07 '22 16:06 ThisIsRuddy

@talentlessguy I think regardless of whether or not V8 will support web3js in the future, the fact that this is currently a breaking change from V6 should be explained in the readme in the section about upgrading from V6. I jumped into the upgrading process from V6 to V8 expecting to continue using web3js, without knowing that it is no longer supported.

williamkmlau avatar Jun 08 '22 10:06 williamkmlau

My project is at a stage where it is very time-consuming to migrate to EtherJS, but we still need support to keep our current implementation of web3-react working against Metamask updates.

Is there any plan to add support for Web3.js in the future?

bbminhtri avatar Jun 28 '22 02:06 bbminhtri