Skip to content

Commit d3b1ac0

Browse files
committed
Fixed EIP-712 getPayload dropping EIP712Domain from types for JSON-RPC calls (ethers-io#687).
1 parent 86b4137 commit d3b1ac0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/hash/src.ts/typed-data.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,8 @@ export class TypedDataEncoder {
463463

464464
const typesWithDomain = shallowCopy(types);
465465
if (typesWithDomain.EIP712Domain) {
466+
logger.throwArgumentError("types must not contain EIP712Domain type", "types.EIP712Domain", types);
467+
} else {
466468
typesWithDomain.EIP712Domain = domainTypes;
467469
}
468470

0 commit comments

Comments
 (0)