fix: prevent calling CONNECT_SUCCESS event for not connected namespaces with WC#4878
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
11 Skipped Deployments
|
There was a problem hiding this comment.
Pull Request Overview
Fixes an issue where the CONNECT_SUCCESS event was being sent for all namespaces in multi-chain WalletConnect connections, even for namespaces that weren't actually connected. The fix ensures the event is only sent when an address is provided, indicating a successful connection.
- Added address check to prevent sending
CONNECT_SUCCESSevents for unconnected namespaces - Enhanced test coverage for the
finalizeWcConnectionmethod - Bumped package version to reflect the fix
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
packages/controllers/src/controllers/ConnectionController.ts |
Added address validation to only send CONNECT_SUCCESS event when connection actually succeeds |
packages/appkit/tests/client/walletconnect-events.test.ts |
Added comprehensive tests to verify event sending behavior with and without address |
packages/appkit/exports/constants.ts |
Version bump from 1.7.19 to 1.7.20 |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||
tomiir
left a comment
There was a problem hiding this comment.
Have you checked on core?
Yes, works fine |
…t_success-events-being
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
…t_success-events-being
Description
When using WC connection on multi-chain instances, we are calling
CONNECT_SUCCESSevent for the not connected namespaces as well, which is wrong.Reproduction Steps
CONNECT_SUCCESSforeip155,solana, andbip12as wellType 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