Repository navigation
fix(wallet): show plain-text personal_sign messages as text - #1339
Conversation
|
@mmlado is attempting to deploy a commit to the IFT Team on Vercel. A member of the Team first needs to authorize it. |
|
Check the workflow logs for details. |
|
/ai-review |
There was a problem hiding this comment.
AI review (claude-opus-5-5 + gpt-6-sol)
The main remaining risk is that binary personal_sign payloads may display as replacement characters rather than in a form the user can identify. Reviewer A flagged this display issue, while Reviewer B found no issues and noted that the displayed bytes match those identified by the helper. The change otherwise appears safe based on the reported tests for hex, plain text, and empty messages.
0 critical, 0 other issue(s) shown (threshold: major).
API usage
| Call | Model | In | Cached | Out | Cost |
|---|---|---|---|---|---|
| reviewer-codex | gpt-6-sol | 3343 | 0 | 742 | $0.0141 |
| reviewer-claude | claude-opus-5-5 | 5141 | 0 | 1031 | $0.0412 |
| synthesizer | gpt-6-luna | 684 | 0 | 285 | $0.0002 |
Total ~$0.0555
|
|
Messages whose bytes are not valid UTF-8 now show as |
JulesFiliot
left a comment
There was a problem hiding this comment.
@mmlado tested and working, thank you for the PR! Let's merge this
.
Summary
personal_signapproval view decodes the message only when it is0x-prefixed hex and shows any other string as UTF-8 text, the same rule the wallet uses when it signs (signMessageinapps/wallet/src/data/api.ts).personalMessageBytesinapps/wallet/src/lib/personal-message.ts, with tests.approval-page.tsxuses it in place ofhexToReadableMessage.Test plan
apps/walletunit tests pass, including the newpersonal-message.test.tspersonal_signwith a plain-text message: the approval popup shows the text as writtenpersonal_signwith a hex message: the popup shows the decoded textpersonal_signwith multi-byte text (héllo 👋): the popup shows it intact