Skip to content

Fix data suffix forwarding to connector clients - #5250

Open
Tiancheng-Xu wants to merge 2 commits into
wevm:mainfrom
Tiancheng-Xu:fix/5248-forward-data-suffix
Open

Tiancheng-Xu wants to merge 2 commits into
wevm:mainfrom
Tiancheng-Xu:fix/5248-forward-data-suffix

Conversation

@Tiancheng-Xu

Copy link
Copy Markdown

Fixes #5248

User impact

Transactions sent through a connector client can now receive the same config-level dataSuffix as transactions sent through the public client.

Root cause

getConnectorClient creates a new viem client for connectors, but it did not forward dataSuffix from the configured public client. Wallet actions therefore saw undefined even when the Wagmi config supplied a suffix.

Minimal fix

Forward only the configured client's dataSuffix when 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 with undefined before the fix and passes on the current head.

Validation

  • pnpm vitest run packages/core/src/actions/getConnectorClient.test.ts
  • pnpm exec biome check packages/core/src/actions/getConnectorClient.ts packages/core/src/actions/getConnectorClient.test.ts .changeset/fuzzy-beans-smile.md
  • pnpm check:types
  • git diff --check

Not 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.

Copilot AI lite review requested due to automatic review settings September 21, 2026 14:14
@changeset-bot

changeset-bot Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e660f1f

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

This PR includes changesets to release 5 packages
Name Type
@wagmi/core Patch
@wagmi/connectors Patch
wagmi Patch
@wagmi/solid Patch
@wagmi/vue 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 Sep 21, 2026

Copy link
Copy Markdown

@Tiancheng-Xu is attempting to deploy a commit to the Wevm Team on Vercel.

A member of the Team first needs to authorize it.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 Medium severity

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 dataSuffix from the config’s public client into the connector client created by getConnectorClient.
  • Add a regression test asserting dataSuffix is present on the connector client returned by getConnectorClient.
  • 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,

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Author

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!

This branch has not been deployed

No deployments
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.

dataSuffix passed to createConfig is not applied to transactions sent through the connector client

2 participants