Skip to content

Commit

Permalink
Normalize EIP-712 types before computing the payload (#4541).
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Jan 18, 2024
1 parent 319d475 commit 56c1361
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src.ts/hash/typed-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,9 @@ export class TypedDataEncoder {

const encoder = TypedDataEncoder.from(types);

// Get the normalized types
types = encoder.types;

const typesWithDomain = Object.assign({ }, types);
assertArgument(typesWithDomain.EIP712Domain == null, "types must not contain EIP712Domain type", "types.EIP712Domain", types);

Expand Down

0 comments on commit 56c1361

Please sign in to comment.