aboutsummaryrefslogtreecommitdiffstats
path: root/packages/order-utils/src/order_hash.ts
diff options
context:
space:
mode:
authorAmir Bandeali <abandeali1@gmail.com>2019-02-05 01:48:11 +0800
committerAmir Bandeali <abandeali1@gmail.com>2019-02-06 01:26:03 +0800
commiteac254f9256499fda4cd3d739410c8180069e0c7 (patch)
treea942c10d728641bda816f3cdaa3d2e9e72853d40 /packages/order-utils/src/order_hash.ts
parent8246dec84342138319b9eaf4778862a8e4770851 (diff)
downloaddexon-0x-contracts-eac254f9256499fda4cd3d739410c8180069e0c7.tar.gz
dexon-0x-contracts-eac254f9256499fda4cd3d739410c8180069e0c7.tar.zst
dexon-0x-contracts-eac254f9256499fda4cd3d739410c8180069e0c7.zip
Fix outdated comments and make verifyingContractAddress a required part of the 0x tx schema
Diffstat (limited to 'packages/order-utils/src/order_hash.ts')
-rw-r--r--packages/order-utils/src/order_hash.ts11
1 files changed, 7 insertions, 4 deletions
diff --git a/packages/order-utils/src/order_hash.ts b/packages/order-utils/src/order_hash.ts
index 3bc23c14e..ce7e6d85f 100644
--- a/packages/order-utils/src/order_hash.ts
+++ b/packages/order-utils/src/order_hash.ts
@@ -4,6 +4,7 @@ import { signTypedDataUtils } from '@0x/utils';
import * as _ from 'lodash';
import { assert } from './assert';
+import { constants } from './constants';
import { eip712Utils } from './eip712_utils';
const INVALID_TAKER_FORMAT = 'instance.takerAddress is not of a type(s) string';
@@ -34,8 +35,9 @@ export const orderHashUtils = {
assert.doesConformToSchema('order', order, schemas.orderSchema, [schemas.hexSchema]);
} catch (error) {
if (_.includes(error.message, INVALID_TAKER_FORMAT)) {
- const errMsg =
- 'Order taker must be of type string. If you want anyone to be able to fill an order - pass ZeroEx.NULL_ADDRESS';
+ const errMsg = `Order taker must be of type string. If you want anyone to be able to fill an order - pass ${
+ constants.NULL_ADDRESS
+ }`;
throw new Error(errMsg);
}
throw error;
@@ -55,8 +57,9 @@ export const orderHashUtils = {
assert.doesConformToSchema('order', order, schemas.orderSchema, [schemas.hexSchema]);
} catch (error) {
if (_.includes(error.message, INVALID_TAKER_FORMAT)) {
- const errMsg =
- 'Order taker must be of type string. If you want anyone to be able to fill an order - pass ZeroEx.NULL_ADDRESS';
+ const errMsg = `Order taker must be of type string. If you want anyone to be able to fill an order - pass ${
+ constants.NULL_ADDRESS
+ }`;
throw new Error(errMsg);
}
throw error;