aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-06-06 18:35:17 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-06-06 18:35:17 +0800
commitce203d9e9d58c41c737ea3b392c253c0da4714ad (patch)
tree6fe975cb942528700e66b8614af653edcad66b60
parent8bf9e4167a91c3e6437606ee8799574ebc10eec2 (diff)
downloaddexon-sol-tools-ce203d9e9d58c41c737ea3b392c253c0da4714ad.tar
dexon-sol-tools-ce203d9e9d58c41c737ea3b392c253c0da4714ad.tar.gz
dexon-sol-tools-ce203d9e9d58c41c737ea3b392c253c0da4714ad.tar.bz2
dexon-sol-tools-ce203d9e9d58c41c737ea3b392c253c0da4714ad.tar.lz
dexon-sol-tools-ce203d9e9d58c41c737ea3b392c253c0da4714ad.tar.xz
dexon-sol-tools-ce203d9e9d58c41c737ea3b392c253c0da4714ad.tar.zst
dexon-sol-tools-ce203d9e9d58c41c737ea3b392c253c0da4714ad.zip
Remove redundant reassignment
-rw-r--r--src/0x.js.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/0x.js.ts b/src/0x.js.ts
index d0b060ffb..302064971 100644
--- a/src/0x.js.ts
+++ b/src/0x.js.ts
@@ -164,7 +164,6 @@ export class ZeroEx {
public async signOrderHashAsync(orderHashHex: string, senderAccount: string): Promise<ECSignature> {
assert.isHexString('orderHashHex', orderHashHex);
await assert.isSenderAccountHexAsync('senderAccount', senderAccount, this.web3Wrapper);
- const makerAddress = senderAccount;
let msgHashHex;
const nodeVersion = await this.web3Wrapper.getNodeVersionAsync();
@@ -178,7 +177,7 @@ export class ZeroEx {
msgHashHex = ethUtil.bufferToHex(msgHashBuff);
}
- const signature = await this.web3Wrapper.signTransactionAsync(makerAddress, msgHashHex);
+ const signature = await this.web3Wrapper.signTransactionAsync(senderAccount, msgHashHex);
let signatureData;
const [nodeVersionNumber] = findVersions(nodeVersion);
@@ -208,7 +207,7 @@ export class ZeroEx {
r: ethUtil.bufferToHex(r),
s: ethUtil.bufferToHex(s),
};
- const isValidSignature = ZeroEx.isValidSignature(orderHashHex, ecSignature, makerAddress);
+ const isValidSignature = ZeroEx.isValidSignature(orderHashHex, ecSignature, senderAccount);
if (!isValidSignature) {
throw new Error(ZeroExError.INVALID_SIGNATURE);
}