Skip to content

fix: prevent modal from closing after wallet disconnect in profile view (multi-wallet)#4708

Merged
0xmkh merged 8 commits intomainfrom
fix/multi-wallet-modal-close
Jul 24, 2025
Merged

fix: prevent modal from closing after wallet disconnect in profile view (multi-wallet)#4708
0xmkh merged 8 commits intomainfrom
fix/multi-wallet-modal-close

Conversation

@0xmkh
Copy link
Copy Markdown
Collaborator

@0xmkh 0xmkh commented Jul 24, 2025

Description

Fixed an issue where the modal would close automatically after disconnecting a wallet from the profile view. This change is only applied if you're using multi-wallet

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-3167

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

@linear
Copy link
Copy Markdown

linear bot commented Jul 24, 2025

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Jul 24, 2025

🦋 Changeset detected

Latest commit: 415fdf2

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

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

@vercel
Copy link
Copy Markdown

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

@0xmkh 0xmkh changed the title fix: prevent modal from closing after wallet disconnect in profile view fix: prevent modal from closing after wallet disconnect in profile view (multi-wallet) Jul 24, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jul 24, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 77.54% 31757 / 40952
🔵 Statements 77.54% 31757 / 40952
🔵 Functions 68.95% 2621 / 3801
🔵 Branches 84.37% 6686 / 7924
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/adapters/wagmi/src/client.ts 77.63% 65.58% 80.48% 77.63% 114-115, 120-121, 132-134, 136, 198-199, 239-242, 345-346, 360, 380-381, 456-457, 468-469, 504-505, 522-523, 537-554, 573-574, 595-596, 600-601, 606-638, 657-663, 666-677, 686-687, 698-699, 720-722, 736-737, 750-751, 766-767, 816-817, 829-830, 838-839, 844-845, 849-854, 861-862, 870-871, 876-877, 886-887, 895-896, 901-902, 908-930, 933-946
packages/appkit/src/client/appkit-base-client.ts 72.62% 88.74% 75.79% 72.62% 183, 194-197, 207-208, 210-236, 268-269, 271-272, 277-278, 357-358, 394-400, 465-466, 495-501, 504-505, 508-509, 527-528, 543-544, 547-548, 590-591, 594, 635-639, 646-647, 650-651, 662-685, 694-695, 712-724, 728-749, 752-758, 761-767, 770-776, 779-785, 788-798, 801-807, 810-816, 832-844, 850-883, 886-896, 948-949, 954, 969-985, 999, 1003-1010, 1077-1079, 1085-1086, 1094-1095, 1097-1098, 1147-1156, 1191-1192, 1204-1205, 1210, 1233-1238, 1281, 1302-1303, 1313, 1315-1331, 1336, 1389-1400, 1446-1459, 1504, 1510-1514, 1533-1534, 1551-1554, 1590-1610, 1633-1644, 1673-1674, 1680-1706, 1914-1915, 1947-1948, 1951-1952, 1965-1968, 1971-1972, 1992-1993, 1996-1997, 2009-2019, 2037-2038, 2041-2047, 2051-2052, 2066, 2074, 2077, 2081, 2086-2105, 2108-2117, 2124-2125, 2139-2140, 2143-2144, 2151-2152, 2191-2192, 2275-2276, 2279-2280, 2283-2286, 2289-2290, 2293-2294, 2297-2298, 2301-2302, 2305-2309, 2318-2327, 2336-227, 1154, 1640, 2088-2109
packages/scaffold-ui/src/views/w3m-profile-wallets-view/index.ts 83.21% 91.33% 78.57% 83.21% 128, 139-141, 147-152, 159-160, 205, 221, 259, 277, 296, 303-304, 347-349, 357, 371, 392, 447, 475, 518, 522-540, 558-563, 566, 584-585, 589-595, 603-604, 607-612, 622-625, 630-631, 687, 716, 732-733, 748-753, 759-764, 767-772
Generated in workflow #13741 for commit 415fdf2 by the Vitest Coverage Report Action

Copy link
Copy Markdown
Collaborator

@lukaisailovic lukaisailovic left a comment

Choose a reason for hiding this comment

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

Your PR is fine, but I don't like how we're handling closing logic in multiple places (controllers + views). IMO it should be in the client/controllers only, and ideally in a single place

@0xmkh
Copy link
Copy Markdown
Collaborator Author

0xmkh commented Jul 24, 2025

@lukaisailovic yep let me try again - i don't remember why i didn't add it to single place

@0xmkh
Copy link
Copy Markdown
Collaborator Author

0xmkh commented Jul 24, 2025

@lukaisailovic yep let me try again - i don't remember why i didn't add it to single place

ahh just saw this - when disconnect event is called the connections array is not updated from wagmi so went ahead and put the modal close logic in profile wallets view

@0xmkh
Copy link
Copy Markdown
Collaborator Author

0xmkh commented Jul 24, 2025

@lukaisailovic yep let me try again - i don't remember why i didn't add it to single place

ahh just saw this - when disconnect event is called the connections array is not updated from wagmi so went ahead and put the modal close logic in profile wallets view

will check if there's a workaround

@vercel
Copy link
Copy Markdown

vercel bot commented Jul 24, 2025

Deployment failed with the following error:

Failed to create deployment for team_BosQAIV33jso6YtnqhZSV5WU in project prj_OhCroIplp28lM4iN5TXosSdpRE7v: FetchError: request to https://76.76.21.112/v13/now/deployments?ownerId=team_BosQAIV33jso6YtnqhZSV5WU&projectId=prj_OhCroIplp28lM4iN5TXosSdpRE7v&skipAutoDetectionConfirmation=1&teamId=team_BosQAIV33jso6YtnqhZSV5WU&traceCarrier=%7B%22ot-baggage-webhookAt%22%3A%221753371172233%22%2C%22ot-baggage-senderUsername%22%3A%22gh.magiziz%22%2C%22baggage%22%3A%22webhookAt%3D1753371172233%2CsenderUsername%3Dgh.magiziz%22%2C%22x-datadog-trace-id%22%3A%225986182284747534828%22%2C%22x-datadog-parent-id%22%3A%224462366375860656588%22%2C%22x-datadog-sampling-priority%22%3A%222%22%2C%22x-datadog-tags%22%3A%22_dd.p.tid%3D6882522400000000%2C_dd.p.dm%3D-3%22%2C%22traceparent%22%3A%2200-688252240000000053133112631cf1ec-3ded829382d259cc-01%22%2C%22tracestate%22%3A%22dd%3Dt.tid%3A6882522400000000%3Bt.dm%3A-3%3Bs%3A2%3Bp%3A3ded829382d259cc%22%7D failed, reason: socket hang up

Comment thread packages/appkit/src/client/appkit-base-client.ts
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Jul 24, 2025

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
pay-test-exchange cec922e Jul 24 2025, 04:03 PM

@0xmkh 0xmkh added this pull request to the merge queue Jul 24, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 24, 2025
@0xmkh 0xmkh added this pull request to the merge queue Jul 24, 2025
Merged via the queue into main with commit a5410b9 Jul 24, 2025
41 checks passed
@0xmkh 0xmkh deleted the fix/multi-wallet-modal-close branch July 24, 2025 17:30
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