coinbase-wallet-sdk
coinbase-wallet-sdk copied to clipboard
Bug: Gasless Transactions Fail with Coinbase API Key (RPC URL)
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:
- The sponsorship label (e.g., "Sponsored by kcplele") should be displayed correctly.
- The transaction should proceed without requiring the user to pay gas fees.
- The transaction should not get stuck in the loading state and should not cancel.
- 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
- The issue only occurs when using a custom Coinbase paymaster RPC URL (e.g., "https://api.developer.coinbase.com/rpc/v1/base-sepolia/
").
- When the transaction is sponsored by "Base" (using the Base-specific URL), the transaction proceeds as expected.
- No clear error messages are returned when the transaction fails after clicking "Confirm." It simply gets stuck loading and then cancels.
- The same behavior is observed regardless of the connected wallet or network being used.
- The problem might be related to how the custom paymaster service is configured or handled within the Coinbase API or the app's integration.
Desktop
No response
Smartphone
No response