diff options
-rw-r--r-- | packages/order-utils/src/signature_utils.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/order-utils/src/signature_utils.ts b/packages/order-utils/src/signature_utils.ts index 44a7203a0..d8703bfda 100644 --- a/packages/order-utils/src/signature_utils.ts +++ b/packages/order-utils/src/signature_utils.ts @@ -277,7 +277,7 @@ export function parseECSignature(signature: string): ECSignature { } function hashTrezorPersonalMessage(message: Buffer): Buffer { - const prefix = ethUtil.toBuffer('\x19Ethereum Signed Message:\n' + String.fromCharCode(message.length)); + const prefix = ethUtil.toBuffer('\x19Ethereum Signed Message:\n' + String.fromCharCode(message.byteLength)); return ethUtil.sha3(Buffer.concat([prefix, message])); } |