aboutsummaryrefslogtreecommitdiffstats
path: root/packages/order-utils
diff options
context:
space:
mode:
authorGreg Hysen <greg.hysen@gmail.com>2018-08-24 17:42:20 +0800
committerAmir Bandeali <abandeali1@gmail.com>2018-08-25 05:40:00 +0800
commit241534a63dab54172326ec71d6b5e78733bb24c6 (patch)
treeb5a903a14895e672d9a5f1a705e360cb4d17958e /packages/order-utils
parent1932aff35c6b07093534cde66dec63c5f919fcf0 (diff)
downloaddexon-0x-contracts-241534a63dab54172326ec71d6b5e78733bb24c6.tar.gz
dexon-0x-contracts-241534a63dab54172326ec71d6b5e78733bb24c6.tar.zst
dexon-0x-contracts-241534a63dab54172326ec71d6b5e78733bb24c6.zip
Fixed trezor personal message in client+contracts; added a test using message signed by Trezor One (firmware v1.6.2)
Diffstat (limited to 'packages/order-utils')
-rw-r--r--packages/order-utils/src/signature_utils.ts2
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 23577efdc..c18e895f5 100644
--- a/packages/order-utils/src/signature_utils.ts
+++ b/packages/order-utils/src/signature_utils.ts
@@ -347,7 +347,7 @@ export const signatureUtils = {
};
function hashTrezorPersonalMessage(message: Buffer): Buffer {
- const prefix = ethUtil.toBuffer('\x19Ethereum Signed Message:\n' + String.fromCharCode(message.byteLength));
+ const prefix = ethUtil.toBuffer('\x19Ethereum Signed Message:\n' + message.byteLength);
return ethUtil.sha3(Buffer.concat([prefix, message]));
}