Repository navigation
Fix data suffix forwarding to connector clients - #5250
Tiancheng-Xu wants to merge 2 commits into
Conversation
🦋 Changeset detectedLatest commit: e660f1f The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
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 |
|
@Tiancheng-Xu is attempting to deploy a commit to the Wevm Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The new config.getClient({ chainId }) access can throw ChainNotConfiguredError for unconfigured connector chainIds, introducing a behavioral regression in getConnectorClient.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
This PR fixes a config propagation gap in getConnectorClient so connector-backed wallet actions can see the same dataSuffix that is already present on Wagmi’s public client.
Changes:
- Forward
dataSuffixfrom the config’s public client into the connector client created bygetConnectorClient. - Add a regression test asserting
dataSuffixis present on the connector client returned bygetConnectorClient. - Add a patch changeset for
@wagmi/core.
| File | Description |
|---|---|
| packages/core/src/actions/getConnectorClient.ts | Forwards dataSuffix into the created connector client. |
| packages/core/src/actions/getConnectorClient.test.ts | Adds regression coverage for dataSuffix forwarding. |
| .changeset/fuzzy-beans-smile.md | Declares a patch release note for the fix. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| return createClient({ | ||
| account, | ||
| chain, | ||
| dataSuffix: config.getClient({ chainId }).dataSuffix, |
There was a problem hiding this comment.
Fixed in e660f1f. The connector client now reads the chain-specific public client only when that chain is configured; otherwise it falls back to the current configured client for dataSuffix. Added a regression covering an unconfigured connector chain. Focused tests pass (9 passed, 1 todo), and the workspace typecheck passes.
|
Hi team, the two Vercel preview checks are currently blocked on team authorization. I’m not a Wevm team member, so I can’t authorize the deployment from my side. Could a maintainer please authorize the preview, or let me know if you’d prefer another way to verify it? Thanks! |

Fixes #5248
User impact
Transactions sent through a connector client can now receive the same config-level
dataSuffixas transactions sent through the public client.Root cause
getConnectorClientcreates a new viem client for connectors, but it did not forwarddataSuffixfrom the configured public client. Wallet actions therefore sawundefinedeven when the Wagmi config supplied a suffix.Minimal fix
Forward only the configured client's
dataSuffixwhen creating the connector client. No other connector behavior changes.Regression coverage
Added a focused test that creates a config with
dataSuffix, connects a mock connector, and verifies the resulting connector client exposes the suffix. The test failed withundefinedbefore the fix and passes on the current head.Validation
pnpm vitest run packages/core/src/actions/getConnectorClient.test.tspnpm exec biome check packages/core/src/actions/getConnectorClient.ts packages/core/src/actions/getConnectorClient.test.ts .changeset/fuzzy-beans-smile.mdpnpm check:typesgit diff --checkNot completed
The full core suite was attempted, but unrelated chain-integration tests received HTTP 400 responses from the local RPC fixtures on ports 8545/8546. I am not treating that run as passing validation.