diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ts/0x.js.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ts/0x.js.ts b/src/ts/0x.js.ts index 7c6557b5b..8496a0989 100644 --- a/src/ts/0x.js.ts +++ b/src/ts/0x.js.ts @@ -1,14 +1,14 @@ import * as BigNumber from 'bignumber.js'; import * as BN from 'bn.js'; import * as ethUtil from 'ethereumjs-util'; +import contract = require('truffle-contract'); import * as Web3 from 'web3'; +import {Web3Wrapper} from './web3_wrapper'; import * as ethABI from 'ethereumjs-abi'; import * as _ from 'lodash'; import {constants} from './utils/constants'; import {assert} from './utils/assert'; -import {Web3Wrapper} from './web3_wrapper'; import {ExchangeWrapper} from './contract_wrappers/exchange_wrapper'; -import contract = require('truffle-contract'); import {ECSignatureSchema} from './schemas/ec_signature_schema'; import {SolidityTypes, ECSignature} from './types'; @@ -71,7 +71,8 @@ export class ZeroEx { const dataBuff = ethUtil.toBuffer(dataHex); const msgHashBuff = ethUtil.hashPersonalMessage(dataBuff); try { - const pubKey = ethUtil.ecrecover(msgHashBuff, + const pubKey = ethUtil.ecrecover( + msgHashBuff, signature.v, ethUtil.toBuffer(signature.r), ethUtil.toBuffer(signature.s)); |