aboutsummaryrefslogtreecommitdiffstats
path: root/packages/order-utils/src
diff options
context:
space:
mode:
authorGreg Hysen <greg.hysen@gmail.com>2018-06-20 08:22:00 +0800
committerGreg Hysen <greg.hysen@gmail.com>2018-06-21 04:54:39 +0800
commit94e260cec668875aa957cbb8c7f241eb9e4f4961 (patch)
treee0b3ed731e4c87173bf14c770dc32a67978e852e /packages/order-utils/src
parent783ac3c10575447878cf339fddfc0d00ffeb1c85 (diff)
downloaddexon-sol-tools-94e260cec668875aa957cbb8c7f241eb9e4f4961.tar
dexon-sol-tools-94e260cec668875aa957cbb8c7f241eb9e4f4961.tar.gz
dexon-sol-tools-94e260cec668875aa957cbb8c7f241eb9e4f4961.tar.bz2
dexon-sol-tools-94e260cec668875aa957cbb8c7f241eb9e4f4961.tar.lz
dexon-sol-tools-94e260cec668875aa957cbb8c7f241eb9e4f4961.tar.xz
dexon-sol-tools-94e260cec668875aa957cbb8c7f241eb9e4f4961.tar.zst
dexon-sol-tools-94e260cec668875aa957cbb8c7f241eb9e4f4961.zip
Fixed how trezor messages are signed in `signature_utils`. Now uses `byteLength` instead of `length`.
Diffstat (limited to 'packages/order-utils/src')
-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 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]));
}