forked from BitBoxSwiss/bitbox02-firmware
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
eth/signed_typed_msg: allow newlines in strings
Values of type string that had newlines were previously rejected, even though dApps use it in practice. A user reported this error while using Collab.land, wihch contained a many-line string message as part of the EIP712 message. We show all lines individually, similar to when signign a regular message. I chose not to skip over empty lines (like we do in signmsg) as it's more explicit and makes the code easier (no need to handle the case of an empty string). Not considered in this commit: strings that contian non-ascii chars - this continues to fail and could be fixed in another commit..
- Loading branch information
Showing
2 changed files
with
38 additions
and
21 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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