From 9c8de3e933d607b54e0d0a19f0a3e39bc356d6d9 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 3 Jul 2018 15:47:13 +0300 Subject: Fix VRS signature generation in order-utils --- packages/order-utils/src/order_factory.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'packages') diff --git a/packages/order-utils/src/order_factory.ts b/packages/order-utils/src/order_factory.ts index 678336ac5..803cb82b1 100644 --- a/packages/order-utils/src/order_factory.ts +++ b/packages/order-utils/src/order_factory.ts @@ -57,9 +57,10 @@ export const orderFactory = { }; function getVRSHexString(ecSignature: ECSignature): string { - const vrs = `0x${intToHex(ecSignature.v)}${ethUtil.stripHexPrefix(ecSignature.r)}${ethUtil.stripHexPrefix( + const ETH_SIGN_SIGNATURE_TYPE = '03'; + const vrs = `${intToHex(ecSignature.v)}${ethUtil.stripHexPrefix(ecSignature.r)}${ethUtil.stripHexPrefix( ecSignature.s, - )}`; + )}${ETH_SIGN_SIGNATURE_TYPE}`; return vrs; } -- cgit