aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/util/order.ts
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2017-12-20 13:44:08 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-12-20 22:30:25 +0800
commitcb11aec84df346d5180c7d5874859c1c34f0bf1c (patch)
treeb959a65bdcfc3e8b01dca1bc160f93a0df8a4bf9 /packages/contracts/util/order.ts
parent972e1675f6490bc10e8d9fd64cce2f7945cd4840 (diff)
downloaddexon-sol-tools-cb11aec84df346d5180c7d5874859c1c34f0bf1c.tar
dexon-sol-tools-cb11aec84df346d5180c7d5874859c1c34f0bf1c.tar.gz
dexon-sol-tools-cb11aec84df346d5180c7d5874859c1c34f0bf1c.tar.bz2
dexon-sol-tools-cb11aec84df346d5180c7d5874859c1c34f0bf1c.tar.lz
dexon-sol-tools-cb11aec84df346d5180c7d5874859c1c34f0bf1c.tar.xz
dexon-sol-tools-cb11aec84df346d5180c7d5874859c1c34f0bf1c.tar.zst
dexon-sol-tools-cb11aec84df346d5180c7d5874859c1c34f0bf1c.zip
Add new underscore-privates rule to @0xproject/tslint-config and fix lint errors
Diffstat (limited to 'packages/contracts/util/order.ts')
-rw-r--r--packages/contracts/util/order.ts6
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,