Skip to content

Commit

Permalink
Rename signTypedData-related types.
Browse files Browse the repository at this point in the history
The type `EIP712TypedData` has been renamed to `TypedDataV1Field` so
that it does not get confused for a valid `signTypedData` message or
field. This type is only used for `V1` of `signTypedData`, which was
based on an early draft version of EIP-712 and doesn't reflect the
state of that EIP today at all.

The type `Version` has been renamed to `SignTypedDataVersion`. This
ensures it doesn't get confused for an encryption version, for example.
It's directly exported from this package, so it might not be clear at
first that it's related to `signTypedData`.
  • Loading branch information
Gudahtt committed Sep 21, 2021
1 parent 8f5a90b commit ab7ccc8
Show file tree
Hide file tree
Showing 3 changed files with 272 additions and 246 deletions.
2 changes: 1 addition & 1 deletion src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Array [
"personalSign",
"recoverPersonalSignature",
"extractPublicKey",
"Version",
"SignTypedDataVersion",
"TYPED_MESSAGE_SCHEMA",
"TypedDataUtils",
"typedSignatureHash",
Expand Down
Loading

0 comments on commit ab7ccc8

Please sign in to comment.