diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-07-03 20:47:13 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-07-05 21:05:57 +0800 |
commit | 9c8de3e933d607b54e0d0a19f0a3e39bc356d6d9 (patch) | |
tree | 8381ec758f02139730d89b988c621239ac9f4180 | |
parent | cbdce6b67ee4ad44feb63766c4af613c18bf505d (diff) | |
download | dexon-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
-rw-r--r-- | packages/order-utils/src/order_factory.ts | 5 |
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; } |