WalletConnect / walletconnect-monorepo

WalletConnect Monorepo
Apache License 2.0
1.35k stars 674 forks source link

Solana Transaction Signing Failing #4589

Open deadeagle63 opened 3 months ago

deadeagle63 commented 3 months ago

Description: Currently whenever a transaction is signed with the Solana mainnet chainId as per the SUPPORTED_CHAINS.md it fails with a -32000 code and a message of transaction failed to send.

SDK(s): (based off of JonWong repo above) @walletconnect/modal ^2.6.2 @walletconnect/sign-client ^2.10.6 @walletconnect/utils ^2.10.6

Steps to reproduce the behavior:

  1. Go to https://feature-walletconnect-fix.doi1f799swne9.amplifyapp.com/ (GooseFX feature link or clone the repo)
  2. Click on 'Connect Wallet' button and connect with a WalletConnect wallet
  3. Scroll down to any of the pools and stake 0.01 USDC
  4. See error

Expected behavior Expect a transaction to succeed if the conditions are correct i.e user has the correct wallet balance or token account.

Screenshots Loom to help

Desktop (please complete the following information):

Additional context Preface, currently the Solana chain uses Wallet-Adapter as its base for interacting with core supported adapters. As of time writing this, the WalletConnect adapter used is primarily sourced from Jon Wong's implementation, due to his PR being stuck in limbo for upping the version I copy-pasta'd the implementation with the updated code @ GooseFX WalletConnect Fix.

linear[bot] commented 3 months ago

CR-50 Solana Transaction Signing Failing

deadeagle63 commented 3 months ago

On further testing/investigation - I believe this is to be caused by Legacy Transactions. Moving to VersionedTransactions they sign and send perfectly. If this is expected I assume this can be closed.

[Edit] Seems like trust wallet fails using the new chainId when trying to send, but wont connect on old chainId - had a false positive due to Exodus wallet