wevm / wagmi

Reactive primitives for Ethereum apps
https://wagmi.sh
MIT License
5.9k stars 1.02k forks source link

Cannot do send Transaction with WalletConnect in Trust Wallet #4244

Closed kyimoemin closed 1 week ago

kyimoemin commented 1 week ago

Check existing issues

Describe the bug

I tried to do sendTransaction of useSendTransaction hook but it doesn't work with TrustWallet (it worked on Metamask). I even tried in WalletConnect's sendTransaction doc's code sandbox and it has the same error.

Error log

TransactionExecutionError: An internal error was received.

Request Arguments:
  chain:  undefined (id: 1)
  from:   0x6118E4f7ef51464a0a00fF278a6ab34DCF391cB1
  to:
  value:  0 ETH

Details: The data couldn’t be read because it is missing.
Version: 2.20.1
    at getTransactionError (chunk-CBR4E2JV.js?v=ae046d6b:1461:10)
    at sendTransaction (chunk-CBR4E2JV.js?v=ae046d6b:1573:11)
    at async sendTransaction2 (chunk-Y4DKP5N5.js?v=ae046d6b:2805:16)Caused by: InternalRpcError: An internal error was received.

Details: The data couldn’t be read because it is missing.
Version: 2.20.1
    at withRetry.delay.count.count (chunk-CBR4E2JV.js?v=ae046d6b:1975:19)
    at async attemptRetry (chunk-CBR4E2JV.js?v=ae046d6b:1940:22)

Link to Minimal Reproducible Example

https://github.com/kyimoemin/wc-playground

Steps To Reproduce

run npm start then connect Trust Wallet with Wallet Connect and then do ETH send transaction.

What Wagmi package(s) are you using?

wagmi

Wagmi Package(s) Version(s)

wagmi@2.12.7

Viem Version

viem@2.20.1

TypeScript Version

typescript@5.5.3

Anything else?

No response

jxom commented 1 week ago

Unsure where to look in your reproduction as it is not minimal. It should only contain wagmi/viem (wallet connection lib like web3modal is also okay) as dependencies.

Please reopen with a minimal reproducible example.

If it works in MetaMask but not Trust Wallet, then it is likely an issue on Trust Wallet's side.

github-actions[bot] commented 1 week ago

Hello @kyimoemin.

Please provide a minimal reproduction using StackBlitz, TypeScript Playground (for type issues), or a separate minimal GitHub repository.

Minimal reproductions are required as they save us a lot of time reproducing your config/environment and issue, and allow us to help you faster.

Once a minimal reproduction is added, a team member will confirm it works, then re-open the issue.