fix: the typed data screen shows only the message fields that are signed (closes #539)
ethers signs only the fields a type declares and drops any other key, but the Message section listed every key the site sent, so an added key read as signed. The Message section now follows the signed type, at every level of nesting and in the type's order. Typed data with other keys is not refused: those keys are listed after the message under "Not part of the signature", by their place in the message. README SignApproval says so. The operator/spender test now also checks the Message section, and new tests cover an added key in a nested struct and in a list item. Model: opus-5-5
This commit was merged in pull request #551.
This commit is contained in:
@@ -2156,7 +2156,12 @@ view would leave a wallet one click from deletion.
|
||||
Bytes that are not UTF-8 are shown as "This message is not text." For
|
||||
typed data, formatted domain/type/message fields (EIP-712). The primary
|
||||
type shown is the one ethers signs, derived from the typed data's `types`,
|
||||
not the type the site states.
|
||||
not the type the site states. The message shows only the fields that type
|
||||
declares, at every level of nesting and in the type's order: ethers signs
|
||||
those and drops any other key. Typed data carrying other keys is not
|
||||
refused; each such key is listed after the message under "Not part of the
|
||||
signature", by its place in the message (`details.note`,
|
||||
`details[1].note`) and its value.
|
||||
- Token permission warning, at the top of the message (typed data whose
|
||||
primary type is `Permit`, as in EIP-2612, or one of Permit2's signature
|
||||
types): "⚠️ TOKEN PERMISSION: Signing this lets the spender below take the
|
||||
|
||||
Reference in New Issue
Block a user