Skip to content

fix: reconnectExternal will go through SIWXUtil on Ethers client#4587

Merged
tomiir merged 41 commits intomainfrom
fix/connectioncontroller-auth
Jun 30, 2025
Merged

fix: reconnectExternal will go through SIWXUtil on Ethers client#4587
tomiir merged 41 commits intomainfrom
fix/connectioncontroller-auth

Conversation

@svenvoskamp
Copy link
Copy Markdown
Contributor

Description

Please include a brief summary of the change.

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

For Linear issues: Closes APKT-xxx
For GH issues: closes #...

Showcase (Optional)

If there is a UI change include the screenshots with before and after state.
If new feature is being introduced, include the link to demo recording.

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

svenvoskamp added 30 commits May 6, 2025 09:33
@vercel
Copy link
Copy Markdown

vercel bot commented Jun 30, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
appkit-basic-html ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 30, 2025 2:49pm
appkit-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 30, 2025 2:49pm
appkit-laboratory ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 30, 2025 2:49pm
10 Skipped Deployments
Name Status Preview Comments Updated (UTC)
appkit-basic-example ⬜️ Ignored (Inspect) Jun 30, 2025 2:49pm
appkit-basic-sign-client-example ⬜️ Ignored (Inspect) Jun 30, 2025 2:49pm
appkit-basic-up-example ⬜️ Ignored (Inspect) Visit Preview Jun 30, 2025 2:49pm
appkit-ethers5-bera ⬜️ Ignored (Inspect) Jun 30, 2025 2:49pm
appkit-nansen-demo ⬜️ Ignored (Inspect) Jun 30, 2025 2:49pm
appkit-vue-solana ⬜️ Ignored (Inspect) Jun 30, 2025 2:49pm
appkit-wagmi-cdn-example ⬜️ Ignored (Inspect) Jun 30, 2025 2:49pm
ethereum-provider-wagmi-example ⬜️ Ignored (Inspect) Jun 30, 2025 2:49pm
next-wagmi-solana-bitcoin-example ⬜️ Ignored (Inspect) Jun 30, 2025 2:49pm
vue-wagmi-example ⬜️ Ignored (Inspect) Jun 30, 2025 2:49pm

@svenvoskamp svenvoskamp changed the title Fix/connectioncontroller auth fix: reconnectExternal will go through SIWXUtil on Ethers client Jun 30, 2025
cursor[bot]

This comment was marked as outdated.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Jun 30, 2025

⚠️ No Changeset found

Latest commit: 7ed122a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Bug: Reconnect Method Omitting SocialUri Parameter

The reconnect method in packages/adapters/ethers5/src/client.ts and packages/adapters/ethers/src/client.ts extracts only id and chainId from AdapterBlueprint.ConnectParams. It incorrectly omits the socialUri parameter, which should be extracted and passed to SIWXUtil.authConnectorAuthenticate, similar to its handling in the connect method.

packages/adapters/ethers/src/client.ts#L538-L551

public override async reconnect(params: AdapterBlueprint.ConnectParams): Promise<void> {
const { id, chainId } = params
const connector = this.connectors.find(c => c.id === id)
if (connector && connector.type === 'AUTH' && chainId) {
await SIWXUtil.authConnectorAuthenticate({
authConnector: connector.provider as unknown as W3mFrameProvider,
chainNamespace: CommonConstantsUtil.CHAIN.EVM,
chainId,
preferredAccountType: getPreferredAccountType('eip155')
})
}

packages/adapters/ethers5/src/client.ts#L590-L603

public override async reconnect(params: AdapterBlueprint.ConnectParams): Promise<void> {
const { id, chainId } = params
const connector = this.connectors.find(c => c.id === id)
if (connector && connector.type === 'AUTH' && chainId) {
await SIWXUtil.authConnectorAuthenticate({
authConnector: connector.provider as unknown as W3mFrameProvider,
chainNamespace: CommonConstantsUtil.CHAIN.EVM,
chainId,
preferredAccountType: getPreferredAccountType('eip155')
})
}

Fix in Cursor


Was this report helpful? Give feedback by reacting with 👍 or 👎

@github-actions
Copy link
Copy Markdown
Contributor

Warnings
⚠️

🔑 Potential UUID detected in packages/adapters/ethers/src/tests/client.test.ts (line 947): ba0ba0cd-17c6-4806-a...

Generated by 🚫 dangerJS against 7ed122a

@github-actions
Copy link
Copy Markdown
Contributor

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 77.74% 30739 / 39538
🔵 Statements 77.74% 30739 / 39538
🔵 Functions 68.64% 2533 / 3690
🔵 Branches 84.36% 6380 / 7562
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/adapters/ethers/src/client.ts 63.73% 71.18% 68.57% 63.73% 51-52, 55-56, 63-65, 87-88, 102-105, 147-148, 179-180, 194-217, 230-266, 272-273, 280-297, 369-391, 394-399, 411-412, 422-443, 448-449, 472, 499-500, 509-510, 555-601, 608-609, 631, 660-661, 672-673, 704-705, 709, 736-741, 750-768, 774-775, 779-784, 793-794, 805-806, 812-824
packages/adapters/ethers5/src/client.ts 54.53% 69.79% 60% 54.53% 48-134, 150-151, 182-183, 197-220, 233-269, 275-276, 283-300, 372-394, 397-402, 414-415, 425-446, 451-452, 475, 502-503, 512-513, 543-589, 611-612, 634, 663-664, 676-677, 710-711, 715, 734-748, 756-774, 780-781, 785-790, 799-800, 811-812, 818-830
Generated in workflow #13043 for commit 7ed122a by the Vitest Coverage Report Action

@tomiir tomiir merged commit 5d885a4 into main Jun 30, 2025
41 checks passed
@tomiir tomiir deleted the fix/connectioncontroller-auth branch June 30, 2025 15:06
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.

3 participants