web3modal: Beta.4-5 breaking changes & full wagmi support

Hi everyone, we have released beta.4 which under the hood gets rid of our custom react hooks and controllers and instead provides full support for https://wagmi.sh

Wagmi is a great library that we were already using before, but were not able to provide full integration for until now.

React

Please follow updated documentation to see how to set up web3modal with wagmi.

Once integrated, you will need to replace all @web3modal/react hooks with ones from wagmi. See Wagmi Documentation for all available options. In general this should bring you way more stability and allow to use other wagmi compatible libraries like lens-use for example.

HTML / JS

Similar to how react no longer has hooks, vanilla no longer uses controllers. Instead you can import and use core functions like getAccount / watchAccount / getSigner etc. from @wagmi/core package. See updated example for new integration steps.

We are working with wagmi team to document @wagmi/core lib, but meanwhile feel free to ask questions here and use your editors intelisens / typescript autocompletion to see what is available.

Feel free to use this issue for further questions.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (8 by maintainers)

Most upvoted comments

Inconsistencies between versions will be solved in upcoming beta.5 ^

@timefordroids nice, although, you can probably remove it now as core package is part of react one.

I guess there are some breaking changes which were not reflected in docs, because I have the following errors:

export 'walletConnectProvider' (imported as 'walletConnectProvider') was not found in '@web3modal/ethereum' (possible exports: Web3ModalEthereum)

export 'modalConnectors' (imported as 'modalConnectors') was not found in '@web3modal/ethereum' (possible exports: Web3ModalEthereum)

export 'EthereumClient' (imported as 'EthereumClient') was not found in '@web3modal/ethereum' (possible exports: Web3ModalEthereum)