test(web): cover wallet connection error states for Freighter not installed and user rejection#243
Merged
K1NGD4VID merged 2 commits intoJul 5, 2026
Conversation
…installed and user rejection - Replace generic connectWallet fails test with two specific error scenarios - Add connectWallet handles Freighter not installed error test verifying error message, disconnected state, and null address - Add connectWallet handles user rejection error test with the same assertions - Error messages match actual freighter.ts implementation (Freighter wallet is not installed) and Freighter API behavior (User rejected access)
Contributor
|
@brodapeethar is attempting to deploy a commit to the K1NGD4VID Team on Vercel. A member of the Team first needs to authorize it. |
|
@brodapeethar Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Contributor
|
Resolve the COnflict @brodapeethar |
Contributor
Author
|
@K1NGD4VID conflict resolved |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds targeted test coverage for wallet connection error states in
useWallet.test.ts, addressing Issue #217. The tests cover two specific scenarios that were previously untested:Freighter not installed — Verifies the hook correctly surfaces the
"Freighter wallet is not installed"error message (matching the actualfreighter.tsimplementation) and transitions to a disconnected state with a null address.User rejected access — Verifies the hook correctly surfaces the
"User rejected access"error message (matching the Freighter API behavior) and transitions to a disconnected state with a null address.Changes
apps/web/hooks/useWallet.test.tsconnectWallet failstest with two focused, well-named test cases that each verify the error message,connectedstate, andaddressnullification after failureTesting
All 5 tests in
useWallet.test.tspass:Related Issues
Closes #217