Skip to content

fix: Disconnect + split public appkit tests into smaller files#4395

Merged
tomiir merged 47 commits intomainfrom
tomas/apkt-2937-lingobug-disconnect-seems-not-to-be-working-ok-with-injected
May 28, 2025
Merged

fix: Disconnect + split public appkit tests into smaller files#4395
tomiir merged 47 commits intomainfrom
tomas/apkt-2937-lingobug-disconnect-seems-not-to-be-working-ok-with-injected

Conversation

@tomiir
Copy link
Collaborator

@tomiir tomiir commented May 23, 2025

Description

  • Centralizes disconnect logic in appkit's base client
  • Removes ChainController's disconnect
  • Proxies all disconnect calls through ConnectionController, calling appkit's connectionControllerClient instead
  • Fixes issue where some disconnections were not awaited, causing wallets to not receive the disconnection request and auto connecting on refresh.
  • Splits appkit client's tests to prevent memory crashes

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

Closes APKT-2937

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

linear bot commented May 23, 2025

@changeset-bot
Copy link

changeset-bot bot commented May 23, 2025

🦋 Changeset detected

Latest commit: 6a7ff5b

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

This PR includes changesets to release 21 packages
Name Type
@reown/appkit-adapter-solana Patch
@reown/appkit-adapter-wagmi Patch
@reown/appkit-wallet-button Patch
@reown/appkit-controllers Patch
@reown/appkit-scaffold-ui Patch
@reown/appkit Patch
@reown/appkit-common Patch
@reown/appkit-ui 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-core Patch
@reown/appkit-experimental Patch
@reown/appkit-pay Patch
@reown/appkit-polyfills Patch
@reown/appkit-siwe Patch
@reown/appkit-siwx 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
Copy link

vercel bot commented May 23, 2025

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

Name Status Preview Comments Updated (UTC)
appkit-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 28, 2025 9:48am
appkit-laboratory ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 28, 2025 9:48am
11 Skipped Deployments
Name Status Preview Comments Updated (UTC)
appkit-basic-ep ⬜️ Ignored (Inspect) May 28, 2025 9:48am
appkit-basic-example ⬜️ Ignored (Inspect) May 28, 2025 9:48am
appkit-basic-sign-client-example ⬜️ Ignored (Inspect) May 28, 2025 9:48am
appkit-basic-up-example ⬜️ Ignored (Inspect) May 28, 2025 9:48am
appkit-ethers5-bera ⬜️ Ignored (Inspect) May 28, 2025 9:48am
appkit-nansen-demo ⬜️ Ignored (Inspect) May 28, 2025 9:48am
appkit-vue-solana ⬜️ Ignored (Inspect) May 28, 2025 9:48am
appkit-wagmi-cdn-example ⬜️ Ignored (Inspect) May 28, 2025 9:48am
ethereum-provider-wagmi-example ⬜️ Ignored (Inspect) May 28, 2025 9:48am
next-wagmi-solana-bitcoin-example ⬜️ Ignored (Inspect) May 28, 2025 9:48am
vue-wagmi-example ⬜️ Ignored (Inspect) Visit Preview May 28, 2025 9:48am

@github-actions
Copy link
Contributor

github-actions bot commented May 23, 2025

Warnings
⚠️

Workflow file .github/workflows/unit_tests.yml has been modified

⚠️ File packages/appkit/src/client/appkit-base-client.ts contains a KEY or SECRET
⚠️ File packages/appkit/tests/client/initialization.test.ts contains a KEY or SECRET
⚠️ File packages/controllers/src/controllers/ChainController.ts contains a KEY or SECRET
⚠️ File packages/controllers/src/controllers/ConnectionController.ts contains a KEY or SECRET
⚠️ File packages/controllers/src/controllers/TelemetryController.ts contains a KEY or SECRET
⚠️ File packages/controllers/tests/controllers/ChainController.test.ts contains a KEY or SECRET
⚠️ File packages/appkit/tests/client/connector-management.test.ts contains a KEY or SECRET
⚠️ File packages/appkit/tests/client/state-management.test.ts contains a KEY or SECRET
⚠️ File packages/appkit/tests/client/connector-management.test.ts contains a KEY or SECRET
⚠️ File packages/appkit/tests/client/state-management.test.ts contains a KEY or SECRET
⚠️ packages/appkit/tests/client/account-management.test.ts uses localhost: which is likely a mistake
⚠️ packages/appkit/tests/client/connector-management.test.ts uses localhost: which is likely a mistake
⚠️ packages/appkit/tests/client/modal-operations.test.ts uses localhost: which is likely a mistake
⚠️ packages/appkit/tests/client/network-management.test.ts uses localhost: which is likely a mistake
⚠️ packages/appkit/tests/client/state-management.test.ts uses localhost: which is likely a mistake
⚠️ packages/appkit/tests/client/theme-management.test.ts uses localhost: which is likely a mistake
⚠️ packages/appkit/tests/client/utility-methods.test.ts uses localhost: which is likely a mistake

Generated by 🚫 dangerJS against 6a7ff5b

@github-actions
Copy link
Contributor

github-actions bot commented May 23, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 76.37% 27214 / 35632
🔵 Statements 76.37% 27214 / 35632
🔵 Functions 68.04% 2308 / 3392
🔵 Branches 83.96% 5499 / 6549
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/appkit/src/client/appkit-base-client.ts 75.55% 88.41% 77.72% 75.55% 174, 193-194, 226-227, 229-230, 235-236, 319-320, 356-362, 425-426, 447-453, 456-457, 474-475, 479, 486-487, 536-540, 553-567, 592-598, 602-614, 617-619, 622-624, 627-629, 632-634, 637-643, 646-648, 651-657, 673-685, 691-724, 727-737, 789-790, 796, 807-821, 827, 831-838, 851-855, 896, 938-942, 948-949, 961, 984-989, 1060, 1064-1065, 1071, 1092-1093, 1103, 1105-1121, 1126, 1179-1190, 1223-1231, 1276, 1282-1286, 1315-1318, 1322, 1338-1348, 1370-1381, 1410-1411, 1417-1443, 1609-1610, 1642-1643, 1646-1647, 1652-1655, 1660-1663, 1666-1667, 1687-1688, 1691-1692, 1714-1715, 1729, 1737, 1740, 1744, 1749-1768, 1771-1780, 1795-1796, 1839-1840, 1928-1929, 1932-1933, 1936-1939, 1942-1943, 1946-1947, 1950-1951, 1954-1955, 1958-1962, 1971-1980, 1989-2000, 1377, 1751-1772
packages/appkit/src/client/appkit.ts 51.58% 79.54% 85% 51.58% 67-81, 84-91, 94-110, 113-119, 124, 128, 134-137, 164-169, 176-179, 182-185, 188-195, 203-204, 211-212, 244-253, 256-258, 269-281, 283, 285-304, 306-320, 327-328, 344-351, 378-379, 383-470, 507-511, 533-534, 557-559, 567-568, 607-608, 168
packages/controllers/exports/utils.ts 100% 100% 100% 100%
packages/controllers/src/controllers/ChainController.ts 82.11% 88.99% 80.89% 82.11% 177-188, 192-210, 214-224, 228-250, 272-273, 294-295, 336-337, 386-393, 409-410, 433-434, 454-455, 464-465, 470-471, 487-488, 493-494, 506-507, 548-551, 594-600, 613-614, 657-658, 709, 735-736, 100, 195
packages/controllers/src/controllers/ConnectionController.ts 85.99% 75.86% 52.38% 85.99% 129-133, 136-140, 174-175, 194, 202, 206, 214, 218, 222, 226, 230, 261-262, 265-266, 301, 305, 312-313, 114-274
packages/controllers/src/controllers/TelemetryController.ts 93.18% 90.47% 77.77% 93.18% 51-54, 90-91, 53
Generated in workflow #12176 for commit 6a7ff5b by the Vitest Coverage Report Action

@tomiir tomiir enabled auto-merge May 27, 2025 07:16
@tomiir tomiir added this pull request to the merge queue May 27, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 27, 2025
@tomiir tomiir added this pull request to the merge queue May 28, 2025
tomiir added 3 commits May 28, 2025 11:21
…king-ok-with-injected' of github.com:reown-com/appkit into tomas/apkt-2937-lingobug-disconnect-seems-not-to-be-working-ok-with-injected
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