feat: add WalletConnect connector support (#298) - #378
Merged
Lakes41 merged 1 commit intoJul 29, 2026
Conversation
- Add 'walletConnect' to SUPPORTED_CONNECTOR_NAMES in validation.js - Update validation.d.ts type to include 'walletConnect' - Fix connectors.ts: remove corrupted local declaration, re-export from validation.js - Fix config.ts: add missing splitCsv import, replace fail() with throw ConfigError - Add WalletConnect parsing and config tests Closes Adamantine-guild#298
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds WalletConnect v2 connector support to the wagmi wallet configuration, allowing mobile wallet users and hardware wallet users to connect via WalletConnect QR code.
Changes
Validation layer
lib/wallet/validation.js: Added'walletConnect'toSUPPORTED_CONNECTOR_NAMESlib/wallet/validation.d.ts: Updated type declaration to include'walletConnect'in the readonly tupleConnector layer
lib/wallet/connectors.ts: Removed corrupted local declaration that conflicted with re-export from validation.js. The file now cleanly re-exports from validation.js with TypeScript type resolution via validation.d.tslib/wallet/config.ts:splitCsvimport (pre-existing bug that causedReferenceErrorat runtime)fail()call withthrow new ConfigError()in thewalletConnectcase (thefailhelper was not imported in this module's scope)Tests
test/wallet-connectors.test.ts: Added tests forwalletConnectparsing (standalone and combined withinjected)test/wallet-config.test.ts: Added tests for WalletConnect config building (with project ID, combined connectors, and missing project ID error path). AddedNEXT_PUBLIC_WALLETCONNECT_PROJECT_IDto the env cleanup list to prevent cross-test leakageAcceptance Criteria ✓
NEXT_PUBLIC_WALLET_CONNECTORS=walletConnect(alone or combined withinjected) produces a working connector without throwingNEXT_PUBLIC_WALLETCONNECT_PROJECT_IDwhilewalletConnectis enabled throws a clearConfigErrorat startup.env.exampleand README document the new connector and variable (already documented)Closes #298