aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/contracts/src')
-rw-r--r--packages/contracts/src/utils/order_utils.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/contracts/src/utils/order_utils.ts b/packages/contracts/src/utils/order_utils.ts
index 513d0087e..c14dc4e80 100644
--- a/packages/contracts/src/utils/order_utils.ts
+++ b/packages/contracts/src/utils/order_utils.ts
@@ -53,8 +53,7 @@ export const orderUtils = {
'uint256 expirationTimeSeconds',
'uint256 salt',
]);
- const orderSchemaHashHex = `0x${orderSchemaHashBuff.toString('hex')}`;
- const orderHashBuff = crypto.solSHA3([
+ const orderParamsHashBuff = crypto.solSHA3([
order.exchangeAddress,
order.makerAddress,
order.takerAddress,
@@ -68,9 +67,10 @@ export const orderUtils = {
order.expirationTimeSeconds,
order.salt,
]);
- const orderHashHex = `0x${orderHashBuff.toString('hex')}`;
- const prefixedOrderHashBuff = crypto.solSHA3([new BigNumber(orderSchemaHashHex), new BigNumber(orderHashHex)]);
- return prefixedOrderHashBuff;
+ const orderSchemaHashHex = `0x${orderSchemaHashBuff.toString('hex')}`;
+ const orderParamsHashHex = `0x${orderParamsHashBuff.toString('hex')}`;
+ const orderHashBuff = crypto.solSHA3([new BigNumber(orderSchemaHashHex), new BigNumber(orderParamsHashHex)]);
+ return orderHashBuff;
},
getOrderHashHex(order: SignedOrder | UnsignedOrder): string {
const orderHashBuff = orderUtils.getOrderHashBuff(order);