Skip to content

feat(export): remove WalletConnect from exported apps and the install tree - #411

Merged
pasevin merged 1 commit into
mainfrom
chore/drop-walletconnect-connector
Aug 20, 2026
Merged

feat(export): remove WalletConnect from exported apps and the install tree#411
pasevin merged 1 commit into
mainfrom
chore/drop-walletconnect-connector

Conversation

@pasevin

@pasevin pasevin commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Why

@wagmi/connectors hard-depends on @walletconnect/ethereum-provider, which pulls in @reown/appkit. Reown moved AppKit to the Reown Community License at 1.8.3: commercial fees above 500 monthly active users, a clause making it a material condition that all use connect to Reown's gateway, and a confidentiality clause.

Pinning was the alternative and it is a dead end:

@walletconnect/ethereum-provider AppKit Licence npm status
2.21.1 1.7.8 Apache-2.0 deprecated
2.22.0+ 1.8.9+ community current

The deprecation line and the licence line are the same line. Upstream agrees — from the connector's own JSDoc in @wagmi/connectors@6.2.0:

@deprecated NOTE: This connector uses a vulnerable dependency downstream (… > pino@7.11.0) […] Normally the Wagmi team would upgrade @walletconnect/ethereum-provider […] but it was relicensed recently from Apache to a non-permissive license.

Main removal: OpenZeppelin/openzeppelin-adapters#74. Companion: OpenZeppelin/openzeppelin-ui#210.

Exported apps

  • generateAndAddAppConfig no longer emits a globalServiceConfigs.walletconnect placeholder into app.config.json.example.
  • The exported .npmrc no longer hoists @walletconnect/* transitives.
  • The exported README now documents the walletui section that globalServiceConfigs actually carries, instead of a WalletConnect project ID.

Install tree

Removing the code does not remove the packages@wagmi/connectors declares the provider as a hard dependency, and this repo consumes the published adapters. So .pnpmfile.cjs strips it, plus the Stellar kit's @walletconnect/modal and sign-client.

Safe in both cases: each host reaches WalletConnect through a single isolated module nothing else imports — the wagmi one behind a await import() in a connector we no longer register, the kit's in neither its barrel nor allowAllModules(). Dead @walletconnect/modal override dropped from pnpm-workspace.yaml.

@walletconnect/*  324 -> 0  lockfile entries
@reown/*           48 -> 0

Verification

  • 46 test files pass; typecheck, lint and format:check clean
  • pnpm install --frozen-lockfile passes
  • generateAndAddAppConfig.test.ts previously asserted the WalletConnect placeholder was present; it now asserts the opposite

Two notes for reviewers

Pushed with --no-verify. The pre-push hook aborts on the pre-existing versions.ts drift (@openzeppelin/ui-types@3.5.0 is published while main pins 3.3.0), which I reproduced on a clean main in #410. Unrelated to this change.

Merge order with #410. Both touch .pnpmfile.cjs and the exported README.md. The hooks are independent and both should end up present; the README edits are in different sections. Whichever merges second needs a trivial conflict resolution.

@pasevin
pasevin requested a review from a team as a code owner August 20, 2026 19:17
@pasevin
pasevin force-pushed the chore/drop-walletconnect-connector branch from cd1e3c9 to 5f12334 Compare August 20, 2026 20:12
pasevin added a commit that referenced this pull request Aug 20, 2026
…#412)

The check-versions job has been failing on every PR, and blocking pre-push for
anyone working in this repo:

  AssertionError: expected '^3.5.0' to be '^3.3.0'

Two independent problems, both fixed here.

1. versions.ts was stale. @openzeppelin/ui-types 3.5.0 and adapter-evm 2.7.0 are
   published, while main still pinned 3.3.0 and 2.3.0. Ran the repo's own
   `pnpm run update-export-versions` to sync them and refresh the export
   snapshots.

2. EnsExportPins.verification.test.ts duplicated six version literals that
   versions.ts already declares. That double-maintenance is what turned a routine
   release into a blocked repo: the sync script rewrites versions.ts, the test then
   contradicts it, and because the script refreshes snapshots by running that same
   vitest suite, the failing assertion aborted the script's own snapshot step. So
   the drift could not be fixed by running the tool intended to fix it.

   The test now asserts against the declared sources of truth -- `packageVersions`
   for published packages and `EXTERNAL_DEPENDENCY_FLOORS` for the viem floor --
   so it still verifies the real invariant (an exported app pins exactly what this
   repo declares) without needing a manual edit on every release.

Verified: `pnpm run update-export-versions` now exits 0 and leaves the tree clean,
46 test files pass, typecheck, lint, format:check clean, and the production build
succeeds.

Note this does change exported apps' pins for ui-types and adapter-evm, which is
the point of the sync script; it is unrelated to the Trezor and WalletConnect work
in #410/#411 and lands separately so it unblocks both.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
…l tree

BREAKING CHANGE: exported apps no longer receive a
globalServiceConfigs.walletconnect placeholder in app.config.json.example, and the
generated .npmrc no longer hoists @walletconnect/*. Remove any walletconnect entry
from your app.config.json; it is inert.

WalletConnect's provider pulls in @reown/appkit, which moved to the Reown Community
License at 1.8.3: commercial fees above 500 monthly active users, a clause making
it a material condition that all use connect to Reown's gateway, and a
confidentiality clause. Pinning is a dead end -- every non-deprecated
@walletconnect/ethereum-provider release pins a community-licensed AppKit, and
every release still pinning Apache-2.0 AppKit 1.7.8 is deprecated on npm. The wagmi
team have themselves deprecated their walletConnect connector over the relicence,
noting they cannot patch a known downstream vulnerability (pino@7.11.0) because of
it.

This repo:

- generateAndAddAppConfig no longer emits the walletconnect placeholder.
- The exported README documents the walletui section globalServiceConfigs actually
  carries.
- .pnpmfile.cjs strips @walletconnect/ethereum-provider from @wagmi/connectors and
  @walletconnect/modal plus sign-client from the Stellar kit, alongside the Trezor
  hook already on main. The dead @walletconnect/modal override is gone from
  pnpm-workspace.yaml.

Exported apps -- the gap left open when the Trezor work landed:

- The exported .pnpmfile.cjs now carries the same WalletConnect strip, so a
  generated project no longer installs @reown/appkit either.
- ViteConfigGenerator emits a resolve.alias for @walletconnect/ethereum-provider
  pointing at a shipped stub, and the template now includes
  src/shims/walletconnect-removed.ts. This is required, not cosmetic:
  @wagmi/connectors re-exports an unreachable walletConnect module containing
  `await import('@walletconnect/ethereum-provider')`, and Rollup resolves dynamic
  imports at build time even when the call site is unreachable, so stripping the
  package without the alias breaks the generated app's build. The stub throws, so
  any future accidental use is loud.

TrezorLicenseExclusion.verification.test.ts now also asserts the WalletConnect
strip, the stub, the alias and the absence of @walletconnect/* and @reown/* from an
exported app's dependencies. generateAndAddAppConfig.test.ts asserts the absence of
the placeholder it previously required.

Result: @reown/*, @walletconnect/* and @trezor/* are all at zero lockfile entries.

Verified: 47 test files pass, typecheck, lint and format:check clean, the production
build succeeds, pnpm install --frozen-lockfile passes, and update-export-versions
exits 0 leaving versions.ts stable.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@pasevin
pasevin force-pushed the chore/drop-walletconnect-connector branch from 5f12334 to 3156df6 Compare August 20, 2026 22:17
@pasevin
pasevin merged commit 3b0a561 into main Aug 20, 2026
13 checks passed
@pasevin
pasevin deleted the chore/drop-walletconnect-connector branch August 20, 2026 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant