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

bug: Unsupported method "eth_signtypeddata_v4" with WalletConnect & Trust Wallet #3012

Closed
1 task done
niratodev opened this issue Sep 15, 2023 · 6 comments
Closed
1 task done

Comments

@niratodev
Copy link

niratodev commented Sep 15, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Package Version

1.4.2

Current Behavior

When signing typed data connected via WalletConnect (Trust Wallet) an error is thrown.

Unsupported method "eth_signtypeddata_v4" 

Expected Behavior

You can use eth_signtypeddata_v4

Steps To Reproduce

Try to use useSignTypedData

Link to Minimal Reproducible Example (StackBlitz, CodeSandbox, GitHub repo etc.)

https://github.com/niratodev/wagmi-walletconnect-trust-wallet-no-method

Anything else?

Apologies if Wagmi is not the source of the issue. I have searched and cannot pinpoint the source, so I am starting here. All indications point to:

  1. eth_signtypeddata_v4 is supported
  2. Wagmi creates the provider and includes the optional methods
@glitch-txs
Copy link
Collaborator

Hi, this issue is related to WalletConnect namespaces, this happens when you use only one chain, in the configuration you can try as workaround something like

const chains = [mainnet, mainnet]

const connector = new WalletConnectConnector({
  chains,
  options: {
    projectId: import.meta.env.VITE_WC_PROJECT_ID,
  },
});

Placing it directly in the WallletConnectConnector and not through the configureChains function.

This will be fixed once we go full optional namespaces.

@tmm tmm closed this as completed Sep 15, 2023
@niratodev
Copy link
Author

No freakin way. How did you figure that out?

@TheJuze
Copy link

TheJuze commented Dec 26, 2023

Hi, i'm having same issue but multiple chains already passed ([mainnet, bsc, okc, polygon, fantom]). So any other ideas how to fix that?
deps:
"@wagmi/core": "^1.4.12"
"viem": "^1.21.0"

@glitch-txs
Copy link
Collaborator

@TheJuze with which wallet? Can you share repro steps?

@TheJuze
Copy link

TheJuze commented Dec 27, 2023

@TheJuze with which wallet? Can you share repro steps?

Trust wallet. Repro steps:

  1. Connect to WC with TrustWallet
  2. Change network to mainnet
  3. call signTypedData
  4. get error Unsupported method "eth_signtypeddata_v4"

Copy link
Contributor

This issue has been locked since it has been closed for more than 14 days.

If you found a concrete bug or regression related to it, please open a new bug report with a reproduction against the latest wagmi version. If you have any other comments you can create a new discussion.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants