Skip to content

feat: add chainId to w3mFrameProvider request method #4471

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 44 commits into from
Jun 19, 2025
Merged

Conversation

svenvoskamp
Copy link
Contributor

@svenvoskamp svenvoskamp commented Jun 4, 2025

Description

Currently the secure site doesn't know from which chainId the rpcRequest is co. It uses the last switched network. In multi-chain environments where multiple connections are possible, there is no possiblity to sign a message on evm libraries when connected on solana and otherwise. This PR updates the schema and adds a chainId to the request.

Changes

  • add param to w3mFrameProvider to get getCaipNetworkbychainNamespace`
  • update wallet schema`
  • update solana authProvider to always have chainNamespace in request

This PR needs a secure site change to fully function correctly.

Secure Site PR: https://github.com/reown-com/secure-appkit/pull/445

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

Copy link

linear bot commented Jun 4, 2025

Copy link

changeset-bot bot commented Jun 4, 2025

🦋 Changeset detected

Latest commit: 63aea98

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

This PR includes changesets to release 23 packages
Name Type
@reown/appkit-adapter-solana Patch
@reown/appkit-adapter-wagmi Patch
@reown/appkit-controllers Patch
@reown/appkit Patch
@reown/appkit-wallet Patch
@reown/appkit-adapter-bitcoin Patch
@reown/appkit-adapter-ethers Patch
@reown/appkit-adapter-ethers5 Patch
@reown/appkit-utils Patch
@reown/appkit-cdn Patch
@reown/appkit-cli Patch
@reown/appkit-codemod Patch
@reown/appkit-common Patch
@reown/appkit-core Patch
@reown/appkit-experimental Patch
@reown/appkit-pay Patch
@reown/appkit-polyfills Patch
@reown/appkit-scaffold-ui Patch
@reown/appkit-siwe Patch
@reown/appkit-siwx Patch
@reown/appkit-testing Patch
@reown/appkit-ui Patch
@reown/appkit-wallet-button 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

Copy link

vercel bot commented Jun 4, 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 19, 2025 8:21am
appkit-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 19, 2025 8:21am
appkit-laboratory ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 19, 2025 8:21am
10 Skipped Deployments
Name Status Preview Comments Updated (UTC)
appkit-basic-example ⬜️ Ignored (Inspect) Jun 19, 2025 8:21am
appkit-basic-sign-client-example ⬜️ Ignored (Inspect) Jun 19, 2025 8:21am
appkit-basic-up-example ⬜️ Ignored (Inspect) Visit Preview Jun 19, 2025 8:21am
appkit-ethers5-bera ⬜️ Ignored (Inspect) Jun 19, 2025 8:21am
appkit-nansen-demo ⬜️ Ignored (Inspect) Jun 19, 2025 8:21am
appkit-vue-solana ⬜️ Ignored (Inspect) Jun 19, 2025 8:21am
appkit-wagmi-cdn-example ⬜️ Ignored (Inspect) Jun 19, 2025 8:21am
ethereum-provider-wagmi-example ⬜️ Ignored (Inspect) Jun 19, 2025 8:21am
next-wagmi-solana-bitcoin-example ⬜️ Ignored (Inspect) Jun 19, 2025 8:21am
vue-wagmi-example ⬜️ Ignored (Inspect) Jun 19, 2025 8:21am

Copy link
Contributor

github-actions bot commented Jun 4, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 77.66% 30462 / 39220
🔵 Statements 77.66% 30462 / 39220
🔵 Functions 68.52% 2514 / 3669
🔵 Branches 84.33% 6299 / 7469
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/adapters/solana/src/providers/AuthProvider.ts 72.51% 77.77% 69.23% 72.51% 49-54, 68-69, 83-84, 130-138, 153-154, 167-173, 176-187
packages/adapters/solana/src/tests/mocks/W3mFrameProvider.ts 97.95% 83.33% 66.66% 97.95% 46
packages/adapters/wagmi/src/connectors/AuthConnector.ts 6.62% 100% 25% 6.62% 53-54, 57-78, 81-126, 129-263
packages/appkit/src/auth-provider/W3MFrameProviderSingleton.ts 100% 100% 33.33% 100%
packages/appkit/src/client/appkit.ts 48.72% 79.31% 86.36% 48.72% 67-81, 84-91, 94-110, 113-120, 123-156, 159-162, 165-168, 171-178, 187-188, 195-196, 223, 226-244, 252-264, 266, 268-287, 289-303, 328-334, 337, 368-369, 374-375, 390-470, 507-511, 533-534, 557-559, 567-568, 607-608
packages/controllers/src/controllers/ChainController.ts 79.25% 87.5% 74.72% 79.25% 177-188, 192-210, 214-224, 228-250, 272-273, 294-295, 336-337, 386-393, 397-410, 433-434, 450-451, 454-455, 464-465, 470-471, 487-488, 506-507, 548-551, 559-560, 598-604, 617-618, 653-654, 704, 730-731, 759-760, 770-771, 100, 195, 728
packages/wallet/src/W3mFrameProvider.ts 48.44% 73.91% 49.35% 48.44% 70-73, 77-78, 86-92, 109-117, 137-145, 154-156, 165-167, 170-178, 182-194, 197-210, 213-225, 228-239, 242-257, 266-268, 280-282, 286-299, 302-311, 328-329, 338-340, 356-358, 374-376, 380-396, 399-410, 413-427, 440-442, 446-464, 467-496, 513-521, 525-533, 540-542, 550-552, 557-566, 572-576, 582-586, 591-592, 598-600, 604-605, 666-668, 670-674, 679-680, 695-705, 720-721, 733-737, 746-750, 753-273, 504-570
packages/wallet/src/W3mFrameSchema.ts 100% 100% 100% 100%
Generated in workflow #12784 for commit 63aea98 by the Vitest Coverage Report Action

@svenvoskamp svenvoskamp added this pull request to the merge queue Jun 19, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 19, 2025
@svenvoskamp svenvoskamp added this pull request to the merge queue Jun 19, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 19, 2025
@svenvoskamp svenvoskamp added this pull request to the merge queue Jun 19, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 19, 2025
@svenvoskamp svenvoskamp added this pull request to the merge queue Jun 19, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 19, 2025
@svenvoskamp svenvoskamp added this pull request to the merge queue Jun 19, 2025
Merged via the queue into main with commit ab4b093 Jun 19, 2025
40 checks passed
@svenvoskamp svenvoskamp deleted the fix/APKT-2697 branch June 19, 2025 10:31
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.

4 participants