Skip to content

Conversation

@enesozturk
Copy link
Contributor

@enesozturk enesozturk commented Dec 30, 2025

Description

Testing another approach. might close #5430

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

Note

Hook & API updates

  • Extends useAppKitWallets with wcError, deep-link failure detection (visibility/focus/timeout), and new onError callback delivering WalletConnectionError (type, message, wallet, originalError).
  • Clears state on (re)connect attempts (wcError, wcLinking, internal refs) and avoids reusing handled wcUri unless linking is cleared.

Controllers

  • ConnectionController: adds wcError state with setWcError, resets wcLinking/wcError in resetUri, tracks deep-link start (wcLinking) and timeout handling.

Error utilities & types (common)

  • Adds ConnectionErrorType and CONNECTION_ERROR_TYPE constants, getErrorMessage() helper, and exports ProviderRpcErrorCode/ConnectionErrorType.

Example UI (Next app)

  • ConnectCard.tsx: integrates useAppKitWallets({ onError }), shows mobile deep-link failure banner with dismiss, suppresses duplicate toasts, hides QR on mobile.

Config

  • tsconfig.json in example: switch JSX to preserve.

Written by Cursor Bugbot for commit 803a4fa. This will update automatically on new commits. Configure here.

@changeset-bot
Copy link

changeset-bot bot commented Dec 30, 2025

⚠️ No Changeset found

Latest commit: f4f741b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Dec 30, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
appkit-basic-html Ready Ready Preview, Comment Dec 31, 2025 3:25pm
appkit-demo Ready Ready Preview, Comment Dec 31, 2025 3:25pm
appkit-gallery Ready Ready Preview, Comment Dec 31, 2025 3:25pm
appkit-headless-sample-app Ready Ready Preview, Comment Dec 31, 2025 3:25pm
appkit-laboratory Ready Ready Preview, Comment Dec 31, 2025 3:25pm
10 Skipped Deployments
Project Deployment Review Updated (UTC)
appkit-basic-example Ignored Ignored Dec 31, 2025 3:25pm
appkit-basic-sign-client-example Ignored Ignored Dec 31, 2025 3:25pm
appkit-basic-up-example Ignored Ignored Dec 31, 2025 3:25pm
appkit-ethers5-bera Ignored Ignored Dec 31, 2025 3:25pm
appkit-nansen-demo Ignored Ignored Dec 31, 2025 3:25pm
appkit-vue-solana Ignored Ignored Dec 31, 2025 3:25pm
appkit-wagmi-cdn-example Ignored Ignored Dec 31, 2025 3:25pm
ethereum-provider-wagmi-example Ignored Ignored Dec 31, 2025 3:25pm
next-wagmi-solana-bitcoin-example Ignored Ignored Dec 31, 2025 3:25pm
vue-wagmi-example Ignored Ignored Dec 31, 2025 3:25pm

@github-actions
Copy link
Contributor

github-actions bot commented Dec 30, 2025

Visual Regression Test Results ✅ Passed

⚠️ 7 visual change(s) detected

Chromatic Build: https://www.chromatic.com/build?appId=6493191bf4b10fed8ca7353f&number=561
Storybook Preview: https://6493191bf4b10fed8ca7353f-hbblekzvhr.chromatic.com/

👉 Please review the visual changes in Chromatic and accept or reject them.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 30, 2025

📦 Bundle Size Check

All bundles are within size limits

📊 View detailed bundle sizes

> @reown/appkit-monorepo@1.7.1 size /home/runner/work/appkit/appkit


> size-limit


[baseline-browser-mapping] The data in this module is over two months old. To ensure accurate Baseline data, please update: npm i baseline-browser-mapping@latest -D

@reown/appkit - Main Entry
Size limit:   80 kB
Size:         75.07 kB with all dependencies, minified and gzipped
Loading time: 1.5 s    on slow 3G
Running time: 375 ms   on Snapdragon 410
Total time:   1.9 s
@reown/appkit/react
Size limit:   235 kB
Size:         233.1 kB with all dependencies, minified and gzipped
Loading time: 4.6 s    on slow 3G
Running time: 1.2 s    on Snapdragon 410
Total time:   5.8 s
@reown/appkit/vue
Size limit:   80 kB
Size:         75.07 kB with all dependencies, minified and gzipped
Loading time: 1.5 s    on slow 3G
Running time: 521 ms   on Snapdragon 410
Total time:   2 s
@reown/appkit-scaffold-ui
Size limit:   220 kB
Size:         212.57 kB with all dependencies, minified and gzipped
Loading time: 4.2 s     on slow 3G
Running time: 617 ms    on Snapdragon 410
Total time:   4.8 s
@reown/appkit-ui
Size limit:   500 kB
Size:         13.15 kB with all dependencies, minified and gzipped
Loading time: 257 ms   on slow 3G
Running time: 126 ms   on Snapdragon 410
Total time:   383 ms

@github-actions
Copy link
Contributor

github-actions bot commented Dec 30, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 78.32% 39343 / 50231
🔵 Statements 78.32% 39343 / 50231
🔵 Functions 76.32% 4234 / 5547
🔵 Branches 86.69% 9555 / 11021
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/common/index.ts 100% 100% 100% 100%
packages/common/src/utils/ErrorUtil.ts 89.61% 88.46% 100% 89.61% 56-57, 76, 94-99
packages/controllers/exports/react.ts 54.84% 86.25% 37.03% 54.84% 77-86, 107-115, 122-129, 152, 459-464, 479, 484, 500-501, 515-517, 520-521, 533-647, 653-708, 713-718, 722-727, 732-778, 144-170, 427-775
packages/controllers/src/controllers/ConnectionController.ts 84.88% 87.7% 54.94% 84.88% 174, 233-237, 240-244, 286-290, 298-299, 306-325, 340, 344, 348, 352, 356, 360, 364, 368, 372, 457, 461, 483-487, 502-504, 515-516, 551-552, 562-563, 565-566, 574-575, 577-578, 597-598
Generated in workflow #16592 for commit f4f741b by the Vitest Coverage Report Action

}
if (ConnectionController.state.wcError) {
ConnectionController.setWcError(false)
}
Copy link

Choose a reason for hiding this comment

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

Cleanup effect immediately clears newly-set error state

The cleanup effect at lines 456-458 clears wcError whenever connectingWallet?.id changes. When the error detection logic sets connectingWallet to undefined and wcError to true, this triggers the cleanup effect on the next render cycle. The effect checks if (ConnectionController.state.wcError) and immediately sets it back to false. Even if the display condition bug were fixed, this cleanup logic would still clear the error before the user could see it. The cleanup intent is for wallet switching, but it incorrectly also triggers when the wallet is cleared due to an error.

Fix in Cursor Fix in Web

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