reown-com / appkit

The full stack toolkit to build onchain app UX
https://reown.com/appkit
Apache License 2.0
4.94k stars 1.41k forks source link

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

Closed svenvoskamp closed 2 days ago

svenvoskamp commented 2 days ago

Description

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

Type of change

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

changeset-bot[bot] commented 2 days ago

🦋 Changeset detected

Latest commit: 167def52eee82dca0ac158403f668c00f98e5f01

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

vercel[bot] commented 2 days ago

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
github-actions[bot] commented 2 days ago

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
svenvoskamp commented 2 days ago

@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