From 8fd7a9e1f534f3e32e82f672ff448165b335e45b Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 10 Dec 2018 15:31:59 -0800 Subject: Actually pass the signature, not the signature index to a wallet contract's `isValidSignature` call --- packages/order-utils/src/signature_utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages') 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; -- cgit v1.2.3 From 89755fe3c2c7de1e919292f383c361aa0a544630 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 10 Dec 2018 15:33:37 -0800 Subject: Add CHANGELOG entry --- packages/order-utils/CHANGELOG.json | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'packages') 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,4 +1,13 @@ [ + { + "version": "3.0.6", + "changes": [ + { + "note": "Fix bug in wallet signature type verification", + "pr": 1414 + } + ] + }, { "timestamp": 1544482891, "version": "3.0.5", -- cgit v1.2.3