From d3b1ac046aaf2a46f6c3efbd93c55adb0cb8f16d Mon Sep 17 00:00:00 2001 From: Richard Moore Date: Tue, 8 Dec 2020 01:37:44 -0500 Subject: [PATCH] Fixed EIP-712 getPayload dropping EIP712Domain from types for JSON-RPC calls (#687). --- packages/hash/src.ts/typed-data.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/hash/src.ts/typed-data.ts b/packages/hash/src.ts/typed-data.ts index c1bc339b6..561264795 100644 --- a/packages/hash/src.ts/typed-data.ts +++ b/packages/hash/src.ts/typed-data.ts @@ -463,6 +463,8 @@ export class TypedDataEncoder { const typesWithDomain = shallowCopy(types); if (typesWithDomain.EIP712Domain) { + logger.throwArgumentError("types must not contain EIP712Domain type", "types.EIP712Domain", types); + } else { typesWithDomain.EIP712Domain = domainTypes; }