From 94e260cec668875aa957cbb8c7f241eb9e4f4961 Mon Sep 17 00:00:00 2001 From: Greg Hysen Date: Tue, 19 Jun 2018 17:22:00 -0700 Subject: Fixed how trezor messages are signed in `signature_utils`. Now uses `byteLength` instead of `length`. --- packages/order-utils/src/signature_utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages') 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])); } -- cgit