ava-labs / ava-labs/core-vm-modules
`beautifyComplexMessage` assumes array elements are strings
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 2
- Avg merge
- 40m
- Merged PRs (30d)
- 7
Description
The logic to pretty print EIP-712 messages assumes that nested array elements are strings, and attempts to call `toUnicodeBold` on them, resulting in an exception being raised back to the caller.
https://github.com/ava-labs/core-vm-modules/blob/2508d550f54ad4f38e9e745b6da66b3b742a9222/packages/evm-module/src/handlers/eth-sign/utils/beautify-message/beautify-message.ts#L26-L32
Reproduction URL: https://ymax.app and create a portfolio.
After signing the permit2 allowance, observe that the wallet invocation for the permit2 EIP-712 signature fails with `e.split is not a function`.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in packages/evm-module/src/handlers/eth-sign/utils/beautify-message/beautify-message.ts at lines 26-32 and inspect how nested array elements are formatted. Reproduce the Permit2 EIP-712 signing failure at ymax.app, then verify that messages containing non-string nested array elements no longer raise the reported exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- blockchain
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100