diff options
Diffstat (limited to 'src/0x.js.ts')
-rw-r--r-- | src/0x.js.ts | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/0x.js.ts b/src/0x.js.ts index 7b53b70ea..7be6922fc 100644 --- a/src/0x.js.ts +++ b/src/0x.js.ts @@ -130,11 +130,13 @@ export class ZeroEx { * Computes the orderHash for a given order and returns it as a hex encoded string. */ public async getOrderHashHexAsync(order: Order|SignedOrder): Promise<string> { - assert.doesConformToSchema( - 'order', SchemaValidator.convertToJSONSchemaCompatibleObject(order as object), orderSchema); + assert.doesConformToSchema('order', + SchemaValidator.convertToJSONSchemaCompatibleObject(order as object), + orderSchema); + const exchangeContractAddr = await this.getExchangeAddressAsync(); - const hashHex = utils.getOrderHashHex(order, exchangeContractAddr); - return hashHex; + const orderHash = utils.getOrderHashHex(order, exchangeContractAddr); + return orderHash; } /** * Signs an orderHash and returns it's elliptic curve signature |