Skip to content

Support Coinbase Smart Wallet in the connect-wallet modal #1178

Description

@levalleux-ludo

Problem

The Connect a wallet modal currently shows a single Coinbase Wallet option that only works with the legacy Coinbase Wallet app / browser extension (an externally-owned account). Users cannot connect a passkey-based Coinbase Smart Wallet.

Root cause

The interface is a Uniswap-interface fork using @web3-react v8. The Coinbase connector (@web3-react/coinbase-wallet@8.2.3) dynamically imports @coinbase/wallet-sdk, which resolves to the legacy v3 SDK (3.7.1, WalletLink era). Passkey-based Smart Wallet support and the preference option only exist in @coinbase/wallet-sdk v4+.

Additionally, the stock connector calls makeWeb3Provider(url) (v3 signature). In v4, makeWeb3Provider(preference) takes a Preference object, so merely bumping the SDK breaks the stock connector.

Proposed change

Keep a single "Coinbase Wallet" option, but upgrade it so that — with preference: { options: "all" } — it uses the browser extension when installed and otherwise opens the passkey-based Coinbase Smart Wallet. No duplicate rows.

  • Add @coinbase/wallet-sdk@^4 as a direct dependency; drop @web3-react/coinbase-wallet.
  • Add a small custom web3-react connector (src/lib/connection/CoinbaseWallet.ts) that uses the v4 API (new CoinbaseWalletSDK({ appName, appLogoUrl, appChainIds }).makeWeb3Provider({ options: "all" })).
  • Wire it into src/lib/connection/index.ts: set the real app name/logo (currently hardcoded to "Uniswap"), pass appChainIds from the existing envChainIds, and remove the mobile deeplink override that forces users into the legacy Coinbase app (so the v4 SDK can serve the Smart Wallet web flow on mobile too).

Acceptance criteria

  • Clicking Coinbase Wallet with the extension installed connects via the extension (EOA path preserved).
  • Clicking Coinbase Wallet without the extension opens the Coinbase Smart Wallet passkey flow and connects.
  • Eager reconnect on refresh, chain switching, and disconnect all continue to work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions