Skip to content

beautifyComplexMessage assumes array elements are strings #411

@mhofman

Description

@mhofman

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.

data.message[key].forEach((item: any, index: number) => {
result += ` ${index}: \n`;
for (const subKey in item) {
if (Array.isArray(item[subKey])) {
result += ` ${subKey}: \n`;
item[subKey].forEach((item: any, index: number) => {
result += ` ${index}: ${toUnicodeBold(item)}\n`;

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.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions