diff --git a/src.ts/hash/typed-data.ts b/src.ts/hash/typed-data.ts index 59a513ca8a..3fdbd8c413 100644 --- a/src.ts/hash/typed-data.ts +++ b/src.ts/hash/typed-data.ts @@ -105,7 +105,7 @@ function getBaseEncoder(type: string): null | ((value: any) => string) { assertArgument(value >= boundsLower && value <= boundsUpper, `value out-of-bounds for ${ type }`, "value", value); - return toBeHex(toTwos(value, 256), 32); + return toBeHex(signed ? toTwos(value, 256): value, 32); }; } } diff --git a/testcases/typed-data.json.gz b/testcases/typed-data.json.gz index afe593ccbe..a997d2a7eb 100644 Binary files a/testcases/typed-data.json.gz and b/testcases/typed-data.json.gz differ