aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts
diff options
context:
space:
mode:
authorAmir Bandeali <abandeali1@gmail.com>2018-03-06 03:40:33 +0800
committerAmir Bandeali <abandeali1@gmail.com>2018-04-21 04:56:16 +0800
commit3e659f0de8ee22380fad40dd70dd5d35ecb92739 (patch)
tree1fba49a47fe4a167ef73403ce4f74821a937ee7b /packages/contracts
parent795a357595b94006a2f1fd6313bdf02103f1b6f5 (diff)
downloaddexon-0x-contracts-3e659f0de8ee22380fad40dd70dd5d35ecb92739.tar.gz
dexon-0x-contracts-3e659f0de8ee22380fad40dd70dd5d35ecb92739.tar.zst
dexon-0x-contracts-3e659f0de8ee22380fad40dd70dd5d35ecb92739.zip
Revert getOrderHash to old logic
Diffstat (limited to 'packages/contracts')
-rw-r--r--packages/contracts/src/contracts/current/protocol/Exchange/LibOrder.sol18
1 files changed, 16 insertions, 2 deletions
diff --git a/packages/contracts/src/contracts/current/protocol/Exchange/LibOrder.sol b/packages/contracts/src/contracts/current/protocol/Exchange/LibOrder.sol
index b548479cd..f0cd8f4fa 100644
--- a/packages/contracts/src/contracts/current/protocol/Exchange/LibOrder.sol
+++ b/packages/contracts/src/contracts/current/protocol/Exchange/LibOrder.sol
@@ -36,8 +36,9 @@ contract LibOrder {
"uint256 salt"
);
+ // TODO: Append `Address` to all address fields and `Amount` to all value fields?
struct Order {
- address exchange;
+ address exchange; // TODO: Does this need to be a part of the Order struct?
address maker;
address taker;
address makerToken;
@@ -61,7 +62,20 @@ contract LibOrder {
// TODO: EIP712 is not finalized yet
orderHash = keccak256(
orderSchemaHash,
- keccak256(order)
+ keccak256(
+ order.exchange,
+ order.maker,
+ order.taker,
+ order.makerToken,
+ order.takerToken,
+ order.feeRecipient,
+ order.makerTokenAmount,
+ order.takerTokenAmount,
+ order.makerFee,
+ order.takerFee,
+ order.expirationTimestampInSec,
+ order.salt
+ )
);
return orderHash;
}