diff options
author | Brandon Millman <brandon@0xproject.com> | 2017-12-22 02:16:25 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-22 02:16:25 +0800 |
commit | cb3582289ff94857d5956bbd71dbf68ee3f42ecf (patch) | |
tree | 62c94cba698834e33cf284c084c04e30766190e8 /packages/contracts/util/order.ts | |
parent | 734d220d6050ad7b9fa66e5e0695b848501eeff6 (diff) | |
parent | 2d53b7d9a499e4fb5791fe34cae5ef118bdfc0ce (diff) | |
download | dexon-sol-tools-cb3582289ff94857d5956bbd71dbf68ee3f42ecf.tar dexon-sol-tools-cb3582289ff94857d5956bbd71dbf68ee3f42ecf.tar.gz dexon-sol-tools-cb3582289ff94857d5956bbd71dbf68ee3f42ecf.tar.bz2 dexon-sol-tools-cb3582289ff94857d5956bbd71dbf68ee3f42ecf.tar.lz dexon-sol-tools-cb3582289ff94857d5956bbd71dbf68ee3f42ecf.tar.xz dexon-sol-tools-cb3582289ff94857d5956bbd71dbf68ee3f42ecf.tar.zst dexon-sol-tools-cb3582289ff94857d5956bbd71dbf68ee3f42ecf.zip |
Merge pull request #285 from 0xProject/fix/underscorePrivate
Add new underscore-privates rule to @0xproject/tslint-config and fix …
Diffstat (limited to 'packages/contracts/util/order.ts')
-rw-r--r-- | packages/contracts/util/order.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/contracts/util/order.ts b/packages/contracts/util/order.ts index ec5362b66..52d611ade 100644 --- a/packages/contracts/util/order.ts +++ b/packages/contracts/util/order.ts @@ -21,7 +21,7 @@ export class Order { if (_.isUndefined(v) || _.isUndefined(r) || _.isUndefined(s)) { throw new Error('Cannot call isValidSignature on unsigned order'); } - const orderHash = this.getOrderHash(); + const orderHash = this._getOrderHash(); const msgHash = ethUtil.hashPersonalMessage(ethUtil.toBuffer(orderHash)); try { const pubKey = ethUtil.ecrecover(msgHash, v, ethUtil.toBuffer(r), ethUtil.toBuffer(s)); @@ -32,7 +32,7 @@ export class Order { } } public async signAsync() { - const orderHash = this.getOrderHash(); + const orderHash = this._getOrderHash(); const signature = await promisify<string>(web3.eth.sign)(this.params.maker, orderHash); const {v, r, s} = ethUtil.fromRpcSig(signature); this.params = _.assign(this.params, { @@ -88,7 +88,7 @@ export class Order { }; return cancel; } - private getOrderHash(): string { + private _getOrderHash(): string { const orderHash = crypto.solSHA3([ this.params.exchangeContractAddress, this.params.maker, |