aboutsummaryrefslogtreecommitdiffstats
path: root/packages/order-utils
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-07-03 20:47:13 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-07-05 21:05:57 +0800
commit9c8de3e933d607b54e0d0a19f0a3e39bc356d6d9 (patch)
tree8381ec758f02139730d89b988c621239ac9f4180 /packages/order-utils
parentcbdce6b67ee4ad44feb63766c4af613c18bf505d (diff)
downloaddexon-sol-tools-9c8de3e933d607b54e0d0a19f0a3e39bc356d6d9.tar
dexon-sol-tools-9c8de3e933d607b54e0d0a19f0a3e39bc356d6d9.tar.gz
dexon-sol-tools-9c8de3e933d607b54e0d0a19f0a3e39bc356d6d9.tar.bz2
dexon-sol-tools-9c8de3e933d607b54e0d0a19f0a3e39bc356d6d9.tar.lz
dexon-sol-tools-9c8de3e933d607b54e0d0a19f0a3e39bc356d6d9.tar.xz
dexon-sol-tools-9c8de3e933d607b54e0d0a19f0a3e39bc356d6d9.tar.zst
dexon-sol-tools-9c8de3e933d607b54e0d0a19f0a3e39bc356d6d9.zip
Fix VRS signature generation in order-utils
Diffstat (limited to 'packages/order-utils')
-rw-r--r--packages/order-utils/src/order_factory.ts5
1 files changed, 3 insertions, 2 deletions
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;
}