How to get Provider and contract values while using web3Modal #2960
-
I have checked the docs but i think i m overlooking something, i am using the "const { open, close } = useWeb3Modal();", and on an onClick event, the open is called and makes the modal popup but once the wallet is selected, then i need the provider and contract values.
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
No suggestions, no answers what so ever |
Beta Was this translation helpful? Give feedback.
-
once the wallet is connected, you should be able to use wagmi hooks to access these values. note that in the latest versions of web3modal, wagmi v1.x.x is used which leans on viem and the "publicClient" terminology rather than wagmi 0.x.x which uses ethers.js and "provider" terminology. you may have reference the 0.x.x versions of the wagmi docs and select an appropriate version of web3modal to be able to use the ethers "provider" terminology. |
Beta Was this translation helpful? Give feedback.
once the wallet is connected, you should be able to use wagmi hooks to access these values.
note that in the latest versions of web3modal, wagmi v1.x.x is used which leans on viem and the "publicClient" terminology rather than wagmi 0.x.x which uses ethers.js and "provider" terminology. you may have reference the 0.x.x versions of the wagmi docs and select an appropriate version of web3modal to be able to use the ethers "provider" terminology.