diff options
-rw-r--r-- | packages/order-utils/CHANGELOG.json | 9 | ||||
-rw-r--r-- | packages/order-utils/src/signature_utils.ts | 2 |
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; |