fix: testapp eth_signTypedData_v4 Example Message verify crash#268
Merged
fan-zhang-sv merged 1 commit intomasterfrom Apr 7, 2026
Merged
fix: testapp eth_signTypedData_v4 Example Message verify crash#268fan-zhang-sv merged 1 commit intomasterfrom
fan-zhang-sv merged 1 commit intomasterfrom
Conversation
Collaborator
✅ Heimdall Review Status
|
The "Example Message" shortcut button for eth_signTypedData_v4 was crashing with "Cannot read properties of undefined (reading 'domain')" during signature verification. Made-with: Cursor
76ab15f to
c4489f3
Compare
stephancill
approved these changes
Apr 7, 2026
montycheese
approved these changes
Apr 7, 2026
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.
Summary
Fixes the "Example Message" shortcut button for
eth_signTypedData_v4in the testapp playground, which was crashing with:{ "message": "Cannot read properties of undefined (reading 'domain')" }Cause
Introduced in #217 (commit
69fbee3b— "Fix SDK source reload and remove noExplicitAny suppressions"), a type-narrowing guard was added to theverifyflow inRpcMethodCard.tsx:This guard was intended to satisfy Biome's
noExplicitAnyrule, but it's overly restrictive. When shortcuts callsubmit(shortcut.data)directly (bypassing the form),data.messageis a JavaScript object — not a JSON string — because the shortcut data stores typed data payloads as objects (required forreplaceAddressInValueto do deep placeholder replacement likeYOUR_ADDRESS_HERE). The guard drops the object and passesundefinedtoverifySignMsg, which then crashes ontypedData['domain'].The form-based path is unaffected because textarea values are always strings.
Fix
Pass
data.messagethrough as-is.verifySignMsgalready handles both strings and objects correctly:This also affects
eth_signTypedData_v3shortcuts which have the same object-based message structure.Test plan
eth_signTypedData_v4, click the "Example Message" shortcut buttoneth_signTypedData_v4eth_signTypedData_v3Made with Cursor