coinbase / coinbase-wallet-sdk

An open protocol that lets users connect their mobile wallets to your DApp
https://coinbase.github.io/coinbase-wallet-sdk/
MIT License
1.49k stars 572 forks source link

Bug: Gasless Transactions Fail with Coinbase API Key (RPC URL) #1423

Closed KcPele closed 2 weeks ago

KcPele commented 1 month ago

Describe the bug

When attempting gasless transactions using a custom paymaster service URL for sponsorship, the transaction fails to complete. The UI correctly displays the sponsor name (e.g., "Sponsored by kcplele"), but upon clicking "Confirm," the transaction keeps loading and eventually cancels without completing. This issue is not present when using "Sponsored by Base," where the transaction completes successfully.

Steps

Steps to Reproduce the Error:

Clone the repository wilsoncusack/wagmi-scw:

git clone https://github.com/wilsoncusack/wagmi-scw.git

Open the project in your code editor.

Locate the part of the code where the paymaster RPC URL is specified.

Change the paymaster RPC URL to a custom Coinbase RPC URL (e.g., "https://api.developer.coinbase.com/rpc/v1/base-sepolia/").

Start the development server:

npm install npm run dev

Navigate to the app in your browser and connect a wallet using the provided interface.

Initiate a gasless transaction using the changed paymaster RPC URL.

Observe the behavior upon clicking "Confirm":

The sponsorship label displays correctly (e.g., "Sponsored by ").

The transaction keeps loading and eventually cancels without completing.

Expected behavior

When using a custom Coinbase paymaster RPC URL for gasless transactions, the transaction should successfully complete after clicking "Confirm." Specifically:

  1. The sponsorship label (e.g., "Sponsored by kcplele") should be displayed correctly.
  2. The transaction should proceed without requiring the user to pay gas fees.
  3. The transaction should not get stuck in the loading state and should not cancel.
  4. The expected action (e.g., setting a greeting or executing a smart contract function) should be successfully performed upon confirmation.

Version

4.x

Additional info

Screenshot from 2024-10-04 18-53-03

Desktop

No response

Smartphone

No response

cb-jake commented 2 weeks ago

Hello @KcPele Thank you for flagging the issue. Is this still an ongoing for you?

cb-jake commented 2 weeks ago

Hey @KcPele, I haven't heard back. Going to close for now. Please re-open if this is still an issue. Thank you.