aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-12-11 07:31:59 +0800
committerFred Carlsen <fred@sjelfull.no>2018-12-13 01:19:33 +0800
commit0dbe2a91a811ada7084beca8fd64780cf0e659e5 (patch)
tree3f61287c94b5ed5a7cd3bb02a13e974064cab88d
parent8afac3a92c8da3b8f54bf01e7d7e95cc36ef1e77 (diff)
downloaddexon-sol-tools-0dbe2a91a811ada7084beca8fd64780cf0e659e5.tar
dexon-sol-tools-0dbe2a91a811ada7084beca8fd64780cf0e659e5.tar.gz
dexon-sol-tools-0dbe2a91a811ada7084beca8fd64780cf0e659e5.tar.bz2
dexon-sol-tools-0dbe2a91a811ada7084beca8fd64780cf0e659e5.tar.lz
dexon-sol-tools-0dbe2a91a811ada7084beca8fd64780cf0e659e5.tar.xz
dexon-sol-tools-0dbe2a91a811ada7084beca8fd64780cf0e659e5.tar.zst
dexon-sol-tools-0dbe2a91a811ada7084beca8fd64780cf0e659e5.zip
Actually pass the signature, not the signature index to a wallet contract's `isValidSignature` call
-rw-r--r--packages/order-utils/src/signature_utils.ts2
1 files changed, 1 insertions, 1 deletions
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;