Describe the bug
The Coinbase Wallet browser extension stores the full URL path (including route) in the connectedDapps extension storage, along with a locked overriddenChainId. This causes wallet_switchEthereumChain requests to fail or be ignored when users navigate to different routes within the same application.
Steps
- Connect Coinbase Wallet extension on route /page-a while on Chain A (e.g., Polygon, chainId 137)
- Navigate to route /page-b
- Attempt to switch chains programmatically via wallet_switchEthereumChain to Chain B (e.g., Base Sepolia, chainId 84532)
- Observe that the chain switch fails silently or the wallet remains on Chain A
- Connect again on /page-b - this creates a second dapp entry
- Inspect extension storage: Application → Extension storage → Coinbase Wallet extension → Local → connectedDapps
- Observe multiple entries with different routes and locked chain IDs
Expected behavior
- dappURL should store the origin only (e.g., https://example.com), not the full path
- A single dapp entry should exist per origin, regardless of which route the user connected from
- wallet_switchEthereumChain should work on any route within the same origin
- overriddenChainId should update when chain switches are successfully requested
- The extension should respect the appUrl configured in the SDK/RainbowKit
Version
No response
Additional info
Additionally, the extension creates multiple dapp entries for the same origin when users connect from different routes, each with its own locked chain ID.
Extension storage state observed
[
{
"dappName": "Page A",
"dappURL": "https://example.com/page-a",
"overriddenChainId": "137",
"connected": true
},
{
"dappName": "Page B",
"dappURL": "https://example.com/page-b",
"overriddenChainId": "84532",
"connected": true
}
]
Key issues:
- dappURL includes the route path (/page-a, /page-b) instead of just the origin
- Multiple entries are created for the same origin based on which route the user connected from
- overriddenChainId is locked per-entry and doesn't update on switch requests
- The SDK's configured appUrl is ignored - the extension reads window.location.href directly
### Desktop
_No response_
### Smartphone
_No response_
Describe the bug
The Coinbase Wallet browser extension stores the full URL path (including route) in the
connectedDappsextension storage, along with a lockedoverriddenChainId. This causeswallet_switchEthereumChainrequests to fail or be ignored when users navigate to different routes within the same application.Steps
Expected behavior
Version
No response
Additional info
Additionally, the extension creates multiple dapp entries for the same origin when users connect from different routes, each with its own locked chain ID.
Extension storage state observed
[ { "dappName": "Page A", "dappURL": "https://example.com/page-a", "overriddenChainId": "137", "connected": true }, { "dappName": "Page B", "dappURL": "https://example.com/page-b", "overriddenChainId": "84532", "connected": true } ] Key issues: - dappURL includes the route path (/page-a, /page-b) instead of just the origin - Multiple entries are created for the same origin based on which route the user connected from - overriddenChainId is locked per-entry and doesn't update on switch requests - The SDK's configured appUrl is ignored - the extension reads window.location.href directly ### Desktop _No response_ ### Smartphone _No response_