-
Notifications
You must be signed in to change notification settings - Fork 5.5k
fix: Prevent Snap crashing when clicking buttons without names cp-13.17.0 #39727
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+79
−1
Conversation
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
Contributor
✨ Files requiring CODEOWNER review ✨🫰 @MetaMask/core-platform (2 files, +79 -1)
|
FrederikBolding
commented
Feb 3, 2026
ui/components/app/snaps/snap-ui-renderer/components/form.test.ts
Outdated
Show resolved
Hide resolved
Mrtenz
reviewed
Feb 3, 2026
Mrtenz
previously approved these changes
Feb 3, 2026
a95a429 to
39c6a7d
Compare
GuillaumeRx
previously approved these changes
Feb 3, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
ui/components/app/snaps/snap-ui-renderer/components/form.test.ts
Outdated
Show resolved
Hide resolved
GuillaumeRx
approved these changes
Feb 3, 2026
cryptodev-2s
approved these changes
Feb 3, 2026
Contributor
Builds ready [95c6fad]
UI Startup Metrics (1422 ± 95 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
INVALID-PR-TEMPLATE
PR's body doesn't match template
release-13.18.0
Issue or pull request that will be included in release 13.18.0
size-S
team-core-platform
Core Platform team
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
Fixes an issue introduced in aa3b155 that caused Snaps to crash when using buttons without names. We changed the fallback for
valuetonullwhich gets passed as a parameter toonUserInput. This is invalid and crashes the Snap.Changelog
CHANGELOG entry: Prevent Snap crashing when clicking buttons without names
Related issues
https://consensyssoftware.atlassian.net/browse/WPC-362
Manual testing steps
Note
Low Risk
Low risk, targeted change to Snap
onUserInputevent payloads; main risk is subtle behavior change if any Snap relied on avaluefield forButtonClickEvent.Overview
Prevents Snaps from crashing when a submit
Buttonhas nonameby ensuringButtonClickEventrequests never include avaluefield (includingnull) in theonUserInputpayload.Adds a regression test covering form submission with an unnamed submit button, asserting the emitted button-click event omits
nameandvaluewhile form submission still includes the formvaluemap.Written by Cursor Bugbot for commit 95c6fad. This will update automatically on new commits. Configure here.