Skip to content

Viem Migration - enable coinbase wallet connection#7475

Open
brunota20 wants to merge 3 commits into
developfrom
bruno/cow-934-cb-option-is-not-working-in-the-widget-configurator
Open

Viem Migration - enable coinbase wallet connection#7475
brunota20 wants to merge 3 commits into
developfrom
bruno/cow-934-cb-option-is-not-working-in-the-widget-configurator

Conversation

@brunota20
Copy link
Copy Markdown
Collaborator

@brunota20 brunota20 commented May 8, 2026

Summary

Fixes Coinbase Wallet (Base) connection not working in the widget configurator in both dapp and standalone modes.

https://www.notion.so/cownation/CB-option-is-not-working-in-the-widget-configurator-3568da5f04ca809bbcd7d6322575701b?v=2fc8da5f04ca81ada4ca000c320d51ef&source=copy_link

Dapp mode — Coinbase Wallet was explicitly disabled (enableCoinbase: false) in the widget configurator's Web3Modal config, causing it to show "Not Detected". Changed to enableCoinbase: true.

Standalone mode — The widget runs in an iframe where the Coinbase Wallet SDK's popup flow gets blocked by the browser, resulting in "Connection declined".
Added coinbasePreference to the Reown AppKit config: 'smartWalletOnly' when in an iframe (uses Coinbase Smart Wallet's iframe-compatible flow), 'all' otherwise.

To Test

  1. Make sure you don't have the Base wallet extension installed in the browser
  2. Open the widget configurator in dapp mode
  3. Try connecting using the Base (formerly Coinbase Wallet) option
  • Wallet connection flow should show "Not Detected" error
  1. Switch to standalone mode
  2. Try connecting using the Base wallet option
  • Wallet connection flow should open normally (no "Connection declined" error)
  • Coinbase Smart Wallet flow should work within the iframe
  1. Test the main app (non-widget) Coinbase Wallet connection
  • Connection should still work as before (both Smart Wallet and EOA options available)

https://www.loom.com/share/687495de623e4f2782cc322bc59230b5

Summary by CodeRabbit

New Features

  • Enabled Coinbase as a wallet provider option in Web3Modal configuration
  • Coinbase wallet support now intelligently adapts based on deployment context—using smart wallet-only mode when embedded in an iframe and all features when standalone

Review Change Stack

@brunota20 brunota20 self-assigned this May 8, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented May 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cowfi Ready Ready Preview May 11, 2026 7:11pm
explorer-dev Ready Ready Preview May 11, 2026 7:11pm
storybook Error Error May 11, 2026 7:11pm
swap-dev Ready Ready Preview May 11, 2026 7:11pm
widget-configurator Ready Ready Preview May 11, 2026 7:11pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
cosmos Ignored Ignored May 11, 2026 7:11pm
sdk-tools Ignored Ignored Preview May 11, 2026 7:11pm

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 8, 2026

Walkthrough

This PR enables Coinbase as a wallet provider across two configuration modules. Web3Modal Ethers v5 configuration enables Coinbase provider support, while AppKit wagmi adapter configuration sets platform-aware Coinbase preferences based on whether the UI is embedded in an iframe.

Changes

Coinbase Provider Enablement

Layer / File(s) Summary
Web3Modal Ethers v5 Config
apps/widget-configurator/src/web3modalConfig.ts
Coinbase provider is enabled by setting enableCoinbase: true in the ethersConfig object.
AppKit Wagmi Coinbase Preferences
libs/wallet/src/wagmi/config.ts
Coinbase preference is configured to use 'smartWalletOnly' mode when embedded in an iframe and 'all' mode otherwise in the createAppKit configuration.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A coin-base of hope does bloom today,
Smart wallets hop, embedded or displayed,
Configuration whispers through the code,
Two files change, one provider mode—
Wagmi and Web3 now agree, hooray! 🌱

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately captures the main objective: enabling Coinbase wallet connection, which is the primary focus of the changes across both configuration files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The pull request description comprehensively documents the changes, issue being fixed, testing steps, and includes a video demonstration link.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch bruno/cow-934-cb-option-is-not-working-in-the-widget-configurator

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@lgahdl
Copy link
Copy Markdown
Collaborator

lgahdl commented May 8, 2026

LGTM!

@elena-zh
Copy link
Copy Markdown
Contributor

Hey @brunota20 , could you please link a notion task for the issue you're addressing here?

Copy link
Copy Markdown
Contributor

@elena-zh elena-zh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not working as expected :(

Image

…ption-is-not-working-in-the-widget-configurator
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 11, 2026

Deploying swap-dev with  Cloudflare Pages  Cloudflare Pages

Latest commit: ac71830
Status:🚫  Build failed.

View logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants