Comparing version 0.2.0 to 0.2.1
@@ -65,3 +65,3 @@ "use strict"; | ||
if (field.type === 'bytes') { | ||
return [[...previousTypes, 'bytes32'], [...previousValues, (0, _utils.keccak256)(value, 'hex')]]; | ||
return [[...previousTypes, 'bytes32'], [...previousValues, (0, _utils.keccak256)(Buffer.isBuffer(value) ? value : (0, _utils.toBuffer)(value), 'hex')]]; | ||
} | ||
@@ -68,0 +68,0 @@ |
@@ -46,3 +46,3 @@ import { defaultAbiCoder } from '@ethersproject/abi'; | ||
if (field.type === 'bytes') { | ||
return [[...previousTypes, 'bytes32'], [...previousValues, keccak256(value, 'hex')]]; | ||
return [[...previousTypes, 'bytes32'], [...previousValues, keccak256(Buffer.isBuffer(value) ? value : toBuffer(value), 'hex')]]; | ||
} | ||
@@ -49,0 +49,0 @@ |
{ | ||
"name": "eip-712", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "Utility functions that can help with signing and verifying EIP-712 based messages", | ||
@@ -5,0 +5,0 @@ "author": "Maarten Zuidhoorn <maarten@zuidhoorn.com>", |
@@ -106,3 +106,3 @@ import { defaultAbiCoder } from '@ethersproject/abi'; | ||
[...previousTypes, 'bytes32'], | ||
[...previousValues, keccak256(value as Buffer, 'hex')] | ||
[...previousValues, keccak256(Buffer.isBuffer(value) ? value : toBuffer(value as string), 'hex')] | ||
]; | ||
@@ -109,0 +109,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
79461