Skip to content
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

fix: Show unsupported network UI on reconnect when chainId in wallet is not supported #3266

Merged
merged 22 commits into from
Nov 19, 2024

Conversation

svenvoskamp
Copy link
Contributor

Description

Show unsupported network UI on reconnect when chainId in wallet is not supported

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

changeset-bot bot commented Nov 19, 2024

🦋 Changeset detected

Latest commit: 167def5

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

This PR includes changesets to release 20 packages
Name Type
@reown/appkit-adapter-ethers5 Patch
@reown/appkit-adapter-ethers Patch
@reown/appkit-adapter-wagmi Patch
@reown/appkit Patch
@apps/demo Patch
@apps/gallery Patch
@apps/laboratory Patch
@reown/appkit-adapter-polkadot Patch
@reown/appkit-adapter-solana Patch
@reown/appkit-utils Patch
@reown/appkit-cdn Patch
@reown/appkit-common Patch
@reown/appkit-core Patch
@reown/appkit-experimental Patch
@reown/appkit-polyfills Patch
@reown/appkit-scaffold-ui Patch
@reown/appkit-siwe Patch
@reown/appkit-siwx Patch
@reown/appkit-ui Patch
@reown/appkit-wallet 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 Nov 19, 2024

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

Name Status Preview Comments Updated (UTC)
appkit-gallery-new 🛑 Canceled (Inspect) Nov 19, 2024 11:27am
appkit-laboratory ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 19, 2024 11:27am
appkit-vue-solana ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 19, 2024 11:27am
appkit-wagmi-cdn-example 🛑 Canceled (Inspect) Nov 19, 2024 11:27am
vue-wagmi-example 🛑 Canceled (Inspect) Nov 19, 2024 11:27am
web3modal-gallery 🛑 Canceled (Inspect) 💬 Add feedback Nov 19, 2024 11:27am

Copy link
Contributor

github-actions bot commented Nov 19, 2024

Coverage Report for Coverage

Status Category Percentage Covered / Total
🔵 Lines 335.44% 4822 / 23555
🔵 Statements 335.44% 4822 / 23555
🔵 Functions 368.54% 387 / 1430
🔵 Branches 474.44999999999993% 741 / 1721
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/appkit/src/client.ts 49.73% 72.22% 71.31% 49.73% 189-190, 233-234, 237-238, 253-256, 259-262, 265-266, 295-306, 309-318, 413, 417, 424, 462-465, 471-478, 481, 569-581, 600-603, 610-611, 619-620, 635-636, 639-640, 643-644, 647-648, 657-667, 673-680, 697-700, 709-738, 740-777, 779-783, 805-810, 812-820, 822-831, 833-853, 855-862, 864-875, 877-890, 892-895, 897-900, 902-905, 907-910, 912-919, 924-984, 987-1000, 1008-1009, 1017-1128, 1134-1137, 1141-1171, 1180-1195, 1199-1201, 1205-1220, 1225-1235, 1238-1310, 1313-1327, 1354, 1371, 1400-1406, 1408-1419, 1421-1428, 1450-1466, 1481-1485, 1500, 1514, 1516-1517, 1549, 1551-1552, 1558-1569, 1576-1577, 1587, 1589, 1670, 1681-1693
Generated in workflow #7423 for commit 167def5 by the Vitest Coverage Report Action

Copy link
Contributor

@enesozturk enesozturk left a comment

Choose a reason for hiding this comment

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

@svenvoskamp We should have been this case in wallet.spec.ts but AFAIK through the time it got skipped and removed, if not can we add that to E2E tests as well?

@svenvoskamp
Copy link
Contributor Author

@svenvoskamp We should have been this case in wallet.spec.ts but AFAIK through the time it got skipped and removed, if not can we add that to E2E tests as well?

We still have this in wallet.spec.ts. It shows unsupported UI when we switch to a different chain in wallet. This case is hard to test with sample wallet, because it will return an array of chains. We need E2E with browser extension to test this better IMO

@svenvoskamp svenvoskamp merged commit 6557a06 into main Nov 19, 2024
20 checks passed
@svenvoskamp svenvoskamp deleted the fix/unsupported-network-on-reconnect branch November 19, 2024 11:32
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.

2 participants