Repository navigation
fix: GuessTheNumber error handling; submission in react - #286
Merged
Merged
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
willemneal
previously approved these changes
Oct 23, 2026
chadoh
marked this pull request as draft
October 23, 2026 17:52
Fixes #285 - Add `e2e/tests/guess-the-number.spec.ts` to verify that the page works as expected in both templates - Add `e2e/util` with fake Freighter and stub RPC - Run this spec in CI - React: added `name="guess"` to the input. - Both templates: failures from the `catch` block and from `isErr()` now go to a separate error state that shows “Couldn’t submit your guess: …” and leaves Submit enabled. - Shared helper: `errorMessage()` in `app-lib/format.ts` formats both `Errors` and the plain `{code, message}` objects that wallets reject with. - Beyond the issue: added `required` to the input in both templates. Without it, an empty submit still shows “Incorrect guess.”
chadoh
force-pushed
the
fix/guess-the-number-bugs
branch
from
October 23, 2026 18:22
a5e3434 to
a9e910b
Compare
chadoh
marked this pull request as ready for review
October 23, 2026 18:24
Contributor
Author
|
@willemneal moved a bunch of stuff to I think we'll be able to replace
|
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.
Fixes #285
e2e/tests/guess-the-number.spec.tsto verify that the page works as expected in both templatese2e/utilwith fake Freighter and stub RPCname="guess"to the input.catchblock and fromisErr()now go to a separate error state that shows “Couldn’t submit your guess: …” and leaves Submit enabled.errorMessage()inapp-lib/format.tsformats bothErrorsand the plain{code, message}objects that wallets reject with.requiredto the input in both templates. Without it, an empty submit still shows “Incorrect guess.”