diff options
author | Fabio Berger <me@fabioberger.com> | 2018-12-11 07:31:59 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-12-11 07:31:59 +0800 |
commit | 8fd7a9e1f534f3e32e82f672ff448165b335e45b (patch) | |
tree | f5ab6d064ad16fdfbd0ca25b147c2689f733966e | |
parent | 7be2dab9d558a75a9944fec99a33437c5a221a92 (diff) | |
download | dexon-sol-tools-8fd7a9e1f534f3e32e82f672ff448165b335e45b.tar dexon-sol-tools-8fd7a9e1f534f3e32e82f672ff448165b335e45b.tar.gz dexon-sol-tools-8fd7a9e1f534f3e32e82f672ff448165b335e45b.tar.bz2 dexon-sol-tools-8fd7a9e1f534f3e32e82f672ff448165b335e45b.tar.lz dexon-sol-tools-8fd7a9e1f534f3e32e82f672ff448165b335e45b.tar.xz dexon-sol-tools-8fd7a9e1f534f3e32e82f672ff448165b335e45b.tar.zst dexon-sol-tools-8fd7a9e1f534f3e32e82f672ff448165b335e45b.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.ts | 2 |
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; |