aboutsummaryrefslogtreecommitdiffstats
path: root/packages/forwarder-helper/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/forwarder-helper/src')
-rw-r--r--packages/forwarder-helper/src/forwarder_helper_factory.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/forwarder-helper/src/forwarder_helper_factory.ts b/packages/forwarder-helper/src/forwarder_helper_factory.ts
index 0fb02e3a6..95f11f555 100644
--- a/packages/forwarder-helper/src/forwarder_helper_factory.ts
+++ b/packages/forwarder-helper/src/forwarder_helper_factory.ts
@@ -1,3 +1,5 @@
+import { assert } from '@0xproject/assert';
+import { schemas } from '@0xproject/json-schemas';
import { SignedOrder } from '@0xproject/types';
import { ForwarderHelperImpl, ForwarderHelperImplConfig } from './forwarder_helper_impl';
@@ -7,10 +9,12 @@ export const forwarderHelperFactory = {
/**
* Given an array of orders and an array of feeOrders
* @param orders An array of objects conforming to SignedOrder. Each order should specify the same makerAssetData and takerAssetData
- * @param orders An array of objects conforming to SignedOrder. Each order should specify ZRX as makerAssetData WETH as takerAssetData
+ * @param feeOrders An array of objects conforming to SignedOrder. Each order should specify ZRX as makerAssetData WETH as takerAssetData
* @return A ForwarderHelper, see type for definition
*/
getForwarderHelperForOrders(orders: SignedOrder[], feeOrders: SignedOrder[] = []): ForwarderHelper {
+ assert.doesConformToSchema('orders', orders, schemas.signedOrdersSchema);
+ assert.doesConformToSchema('feeOrders', orders, schemas.signedOrdersSchema);
const config: ForwarderHelperImplConfig = {
orders,
feeOrders,