Skip to content

fix: honor enableInjected/enableEIP6963 and dedupe injected wallets#5655

Merged
0xmkh merged 2 commits into
mainfrom
rtomas/fix-wallet-filters
May 13, 2026
Merged

fix: honor enableInjected/enableEIP6963 and dedupe injected wallets#5655
0xmkh merged 2 commits into
mainfrom
rtomas/fix-wallet-filters

Conversation

@rtomas

@rtomas rtomas commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes wallet filtering options on the Wagmi adapter so they actually behave as documented. enableInjected was never wired to OptionsController state, the wagmi addWagmiConnector filter conflated the basic injected connector with EIP6963-discovered ones, and WalletUtil.filterOutDuplicatesByRDNS skipped dedup whenever enableEIP6963 was false — which is why MetaMask appeared twice. includeWalletIds and excludeWalletIds previously only filtered API-fetched wallets; they now also filter injected/EIP6963/multi-chain connectors in the connect view via connector.explorerId / connector.explorerWallet?.id. Verified with 7 new unit tests across @reown/appkit-controllers, @reown/appkit-adapter-wagmi, and @reown/appkit-scaffold-ui, all of which fail against the unfixed source and pass with the fix applied.

Type of change

  • Chore (non-breaking change that addresses non-functional tasks, maintenance, or code quality improvements)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Associated Issues

Closes #4430

Showcase (Optional)

N/A — no UI visual changes; behavior change is in which wallets render.

Checklist

  • Code in this PR is covered by automated tests (Unit tests, E2E tests)
  • My changes generate no new warnings
  • I have reviewed my own code
  • I have filled out all required sections
  • I have tested my changes on the preview link
  • Approver of this PR confirms that the changes are tested on the preview link

Wires `enableInjected` through to OptionsController state, splits the
WagmiAdapter filter so `enableInjected` and `enableEIP6963` work
independently, always dedupes featured/recommended against connectors,
and applies `includeWalletIds`/`excludeWalletIds` to injected and
EIP6963 connectors in the connect view.

Closes #4430
@changeset-bot

changeset-bot Bot commented Apr 30, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a555bf7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 26 packages
Name Type
@reown/appkit Patch
@reown/appkit-controllers Patch
@reown/appkit-adapter-wagmi Patch
@reown/appkit-adapter-bitcoin Patch
@reown/appkit-adapter-ethers Patch
@reown/appkit-adapter-ethers5 Patch
@reown/appkit-adapter-solana Patch
@reown/appkit-adapter-ton Patch
@reown/appkit-adapter-tron Patch
@reown/appkit-universal-connector Patch
@reown/appkit-cdn Patch
@reown/appkit-experimental Patch
@reown/appkit-testing Patch
@reown/appkit-ui Patch
@reown/appkit-core Patch
@reown/appkit-utils Patch
@reown/appkit-scaffold-ui Patch
@reown/appkit-siwe Patch
@reown/appkit-siwx Patch
@reown/appkit-wallet-button Patch
@reown/appkit-pay Patch
@reown/appkit-common Patch
@reown/appkit-polyfills Patch
@reown/appkit-wallet Patch
@reown/appkit-cli Patch
@reown/appkit-codemod Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Apr 30, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
appkit-demo Ready Ready Preview, Comment May 13, 2026 1:21pm
appkit-gallery Ready Ready Preview, Comment May 13, 2026 1:21pm
appkit-headless-sample-app Ready Ready Preview, Comment May 13, 2026 1:21pm
appkit-laboratory Ready Ready Preview, Comment May 13, 2026 1:21pm
9 Skipped Deployments
Project Deployment Actions Updated (UTC)
appkit-basic-example Ignored Ignored May 13, 2026 1:21pm
appkit-basic-sign-client-example Ignored Ignored May 13, 2026 1:21pm
appkit-basic-up-example Ignored Ignored May 13, 2026 1:21pm
appkit-ethers5-bera Ignored Ignored May 13, 2026 1:21pm
appkit-nansen-demo Ignored Ignored May 13, 2026 1:21pm
appkit-wagmi-cdn-example Ignored Ignored May 13, 2026 1:21pm
ethereum-provider-wagmi-example Ignored Ignored May 13, 2026 1:21pm
next-wagmi-solana-bitcoin-example Ignored Ignored May 13, 2026 1:21pm
vue-wagmi-example Ignored Ignored May 13, 2026 1:21pm

Request Review

@github-actions

github-actions Bot commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

Visual Regression Test Results ✅ Passed

⚠️ 15 visual change(s) detected

Chromatic Build: https://www.chromatic.com/build?appId=6493191bf4b10fed8ca7353f&number=902
Storybook Preview: https://6493191bf4b10fed8ca7353f-edqsyquxbp.chromatic.com/

👉 Please review the visual changes in Chromatic and accept or reject them.

@github-actions

github-actions Bot commented Apr 30, 2026

Copy link
Copy Markdown
Contributor
Warnings
⚠️

🔑 Potential UUID detected in packages/adapters/wagmi/src/tests/client.test.ts (line 419): 07ba87ed-43aa-4adf-4...

Generated by 🚫 dangerJS against a555bf7

@github-actions

github-actions Bot commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

📦 Bundle Size Check

All bundles are within size limits

📊 View detailed bundle sizes

> @reown/appkit-monorepo@1.7.1 size /home/runner/work/appkit/appkit


> size-limit

@reown/appkit - Main Entry
Size limit:   80 kB
Size:         75.77 kB with all dependencies, minified and gzipped
Loading time: 1.5 s    on slow 3G
Running time: 167 ms   on Snapdragon 410
Total time:   1.7 s
@reown/appkit/react
Size limit:   235 kB
Size:         234.95 kB with all dependencies, minified and gzipped
Loading time: 4.6 s     on slow 3G
Running time: 623 ms    on Snapdragon 410
Total time:   5.3 s
@reown/appkit/vue
Size limit:   80 kB
Size:         75.77 kB with all dependencies, minified and gzipped
Loading time: 1.5 s    on slow 3G
Running time: 216 ms   on Snapdragon 410
Total time:   1.7 s
@reown/appkit-scaffold-ui
Size limit:   220 kB
Size:         214.23 kB with all dependencies, minified and gzipped
Loading time: 4.2 s     on slow 3G
Running time: 440 ms    on Snapdragon 410
Total time:   4.7 s
@reown/appkit-ui
Size limit:   500 kB
Size:         13.16 kB with all dependencies, minified and gzipped
Loading time: 258 ms   on slow 3G
Running time: 19 ms    on Snapdragon 410
Total time:   277 ms

@github-actions

github-actions Bot commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 78.57% 39856 / 50724
🔵 Statements 78.57% 39856 / 50724
🔵 Functions 76.12% 4260 / 5596
🔵 Branches 86.66% 9700 / 11192
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/adapters/wagmi/src/client.ts 76.01% 68.57% 79.54% 76.01% 125-126, 131-132, 146-156, 217-218, 258-261, 380-381, 395, 405-406, 419-420, 497-498, 559-560, 577-592, 606-623, 643-644, 657-666, 677-678, 682-683, 688-720, 739-748, 752-758, 761-772, 781-782, 793-794, 815-817, 831-832, 845-846, 861-862, 905-906, 930-931, 939-940, 945-946, 953-954, 962-963, 968-969, 978-979, 987-988, 993-994, 1000-1022, 1025-1038
packages/appkit/src/client/appkit-base-client.ts 72.95% 85.21% 76.69% 72.95% 184-190, 210, 223-226, 229, 241-242, 248-249, 252, 261, 308-309, 355-356, 394-395, 397-398, 403-404, 486-487, 523-529, 600-601, 623-638, 641, 675-676, 679, 720-724, 731-732, 735-736, 741-742, 753-776, 785-786, 803-823, 827-848, 851-877, 880-886, 889-895, 898-904, 907-913, 916-926, 929-935, 938-945, 959-968, 971-977, 980-981, 984-985, 1004-1005, 1028-1068, 1075-1087, 1093-1120, 1123-1133, 1165-1166, 1191-1192, 1197, 1212-1228, 1242, 1246-1254, 1285-1286, 1305-1308, 1312-1313, 1315-1316, 1350-1352, 1356-1377, 1382-1383, 1391-1392, 1394-1395, 1489-1490, 1502-1503, 1508, 1531-1536, 1583, 1604-1605, 1614, 1616-1632, 1637, 1683-1684, 1696-1707, 1754-1771, 1816, 1822-1826, 1847-1862, 1865-1866, 1892-1895, 1931-1950, 1982, 2025-2026, 2032-2058, 2279-2280, 2317-2318, 2321-2322, 2338-2341, 2344-2345, 2365-2366, 2369-2370, 2391, 2412-2413, 2416-2426, 2430-2431, 2445, 2453, 2472-2473, 2479-2480, 2514-2519, 2537-2538, 2541-2542, 2589-2590, 2661-2662, 2665-2666, 2669-2672, 2675-2676, 2679-2680, 2683-2684, 2687-2688, 2691-2695, 2704-2713, 2722-2733, 1375, 2425
packages/controllers/src/controllers/OptionsController.ts 87.86% 98.46% 55.17% 87.86% 246, 275-276, 328, 332, 360, 402-405, 409-412, 416-419, 423-426, 477, 381, 472
packages/controllers/src/utils/ConnectorUtil.ts 90.93% 97.02% 66.66% 90.93% 137-144, 194-206, 283, 304-306, 322-327, 494-500, 40, 388
packages/controllers/src/utils/WalletUtil.ts 97.38% 90.9% 52.94% 97.38% 99-100, 175, 213
Generated in workflow #17106 for commit a555bf7 by the Vitest Coverage Report Action

enesozturk added a commit that referenced this pull request May 6, 2026
…on test

The mobile-wallet-features.spec.ts:73 "it should show open button" test
asserts the secondary button is disabled immediately after clicking a
wallet, then enabled 2s later — but w3m-connecting-wc-mobile sets
isLoading = !this.uri synchronously in its constructor. When the WC URI
is already cached (depends on relay timing and prior tests in the serial
suite), the loading state is invisible and the disabled assertion fails.

Same widget pattern exists for the desktop equivalent (w3m-connecting-wc-web)
but the desktop test never asserts on loading state, so only the mobile
test is affected.

Drop the disabled: true precondition. The remaining disabled: false
assertion (with 60s default timeout) verifies what users actually care
about — the Open button works after picking a wallet.

This flake has been blocking unrelated PRs (e.g. #5655 on April 30, #5638).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@0xmkh 0xmkh merged commit cc75433 into main May 13, 2026
100 of 122 checks passed
@0xmkh 0xmkh deleted the rtomas/fix-wallet-filters branch May 13, 2026 14:21
@github-actions github-actions Bot locked and limited conversation to collaborators May 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] EIP6963 and Injected Wallets Show Up Despite Being Disabled — Also Appear Duplicated (Using Wagmi Adapter)

2 participants