From eac254f9256499fda4cd3d739410c8180069e0c7 Mon Sep 17 00:00:00 2001 From: Amir Bandeali Date: Mon, 4 Feb 2019 09:48:11 -0800 Subject: Fix outdated comments and make verifyingContractAddress a required part of the 0x tx schema --- packages/order-utils/src/order_hash.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'packages/order-utils/src') 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; -- cgit v1.2.3