aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorFabio B <kandinsky454@protonmail.ch>2018-12-11 21:22:26 +0800
committerGitHub <noreply@github.com>2018-12-11 21:22:26 +0800
commiteec9957831c3f12a0e3088b213cb765c2418b9c4 (patch)
tree519af3f2c9809f25cf944c26c5776dd6411568ca /packages
parent4200064eab2bb5b227653bf9848e73227f36df7b (diff)
parent89755fe3c2c7de1e919292f383c361aa0a544630 (diff)
downloaddexon-sol-tools-eec9957831c3f12a0e3088b213cb765c2418b9c4.tar
dexon-sol-tools-eec9957831c3f12a0e3088b213cb765c2418b9c4.tar.gz
dexon-sol-tools-eec9957831c3f12a0e3088b213cb765c2418b9c4.tar.bz2
dexon-sol-tools-eec9957831c3f12a0e3088b213cb765c2418b9c4.tar.lz
dexon-sol-tools-eec9957831c3f12a0e3088b213cb765c2418b9c4.tar.xz
dexon-sol-tools-eec9957831c3f12a0e3088b213cb765c2418b9c4.tar.zst
dexon-sol-tools-eec9957831c3f12a0e3088b213cb765c2418b9c4.zip
Merge pull request #1414 from 0xProject/fix/signature-utils/walletSignature
[order-utils] Fix Wallet Signature Verification
Diffstat (limited to 'packages')
-rw-r--r--packages/order-utils/CHANGELOG.json9
-rw-r--r--packages/order-utils/src/signature_utils.ts2
2 files changed, 10 insertions, 1 deletions
diff --git a/packages/order-utils/CHANGELOG.json b/packages/order-utils/CHANGELOG.json
index 989bd9397..ab2720e9a 100644
--- a/packages/order-utils/CHANGELOG.json
+++ b/packages/order-utils/CHANGELOG.json
@@ -1,5 +1,14 @@
[
{
+ "version": "3.0.6",
+ "changes": [
+ {
+ "note": "Fix bug in wallet signature type verification",
+ "pr": 1414
+ }
+ ]
+ },
+ {
"timestamp": 1544482891,
"version": "3.0.5",
"changes": [
diff --git a/packages/order-utils/src/signature_utils.ts b/packages/order-utils/src/signature_utils.ts
index 96d90e21a..131144d48 100644
--- a/packages/order-utils/src/signature_utils.ts
+++ b/packages/order-utils/src/signature_utils.ts
@@ -115,7 +115,7 @@ export const signatureUtils = {
assert.isHexString('signature', signature);
assert.isETHAddressHex('signerAddress', signerAddress);
// tslint:disable-next-line:custom-no-magic-numbers
- const signatureWithoutType = signature.slice(-2);
+ const signatureWithoutType = signature.slice(0, -2);
const walletContract = new IWalletContract(artifacts.IWallet.compilerOutput.abi, signerAddress, provider);
const isValid = await walletContract.isValidSignature.callAsync(data, signatureWithoutType);
return isValid;