-
Notifications
You must be signed in to change notification settings - Fork 373
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
Contract Read failling when connected to wrong network #725
Comments
So I just noticed that when calling the useContractCall hooks, and also all the other specific ones, like useEtherBalance or useTokenAllowance, you can pass a second argument with an object and in that object you can specify the chain Id
I haven't seen this neither in the typescript types definition or in the documentation. Also when adding this typescript fails because it says yt should only have one argument instead of 2. |
Similar to my closed issue #685 |
Are you updated to the latest version?
|
Yes, I was in a realy old version, updating to v1 solved the problem. |
Connecting to other networks also works fine useCalls(calls, { chainId: Goerli.chainId }) this worked for me |
Hi! I'm developing a Dapp and all the data I'm showing in my frontend is being fetch from a Smart Contract to avoid having to write a server.
I'm having an issue that if I have metamask Installed and I'm not connected to the network I set in the DappProvider the response from the smart contract call is undefined. I need to manually change networks and then the data will be fetch correctly and shown correctyl in the frontend.
Is there a way to avoid the smart contract read to be dependant of the network I'm connected?
Requesting the user to change the network is not a solution as I need some data to be shown in the landing page so users shouldn't be requested to connect or change networks in that specific page
The text was updated successfully, but these errors were encountered: