Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When using WalletConnect v2 provider getSigner seems to be going to the v1 API #896

Open
JQE opened this issue Oct 19, 2023 · 1 comment

Comments

@JQE
Copy link

JQE commented Oct 19, 2023

I am use web3-react: 8.1.3-beta.0 on core and 8.5.1 for walletconnect-v2

What i am trying to do is a get an ethers contract like so

new ethers.Contract(address, abi, signer)

address is the address as a string, abi is the abi as a string
signer is where it seems to be my issue i have tried the following methods.

const { provider } =useWeb3React()
const signer = provider.getSigner()

i have also tried using the provided hooks from the initialize connector:

const provider = await hooks.getProvider();
const signer = provider.getSigner();

i have also tried replacing the signer with the web3Provider provided by wallet connect directly.
Anytime i do this i get the error that it can't connect to
https://rpc.walletconnect.com/v1/?chainId=eip155:MYCHAINID&projectId=MYPROJECTID

i am not sure why its doing that. I have tried setting the rpcMap in the configuration, but the signer always seems to have httpRpc set to that url. Any ideas on where i can look or what my next steps are? I am trying to avoid re-writing my entire app to get walletconnect v2 working.

i am clearly missing something in how to acquire the proper provider when using walletconnectv2.

as a note all the code works when i use metamask connetor.

@EnettyTech
Copy link

Same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants