aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packages/contract-wrappers/src/contract_wrappers/order_validator_wrapper.ts19
-rw-r--r--packages/contract-wrappers/src/types.ts5
2 files changed, 12 insertions, 12 deletions
diff --git a/packages/contract-wrappers/src/contract_wrappers/order_validator_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/order_validator_wrapper.ts
index 3b83fc53b..854a93bbf 100644
--- a/packages/contract-wrappers/src/contract_wrappers/order_validator_wrapper.ts
+++ b/packages/contract-wrappers/src/contract_wrappers/order_validator_wrapper.ts
@@ -44,13 +44,13 @@ export class OrderValidatorWrapper extends ContractWrapper {
return result;
}
/**
- * Get an object conforming to OrdersAndTradersInfo containing on-chain information of the provided orders and addresses
- * @return OrdersAndTradersInfo
+ * Get an array of objects conforming to OrderAndTraderInfo containing on-chain information of the provided orders and addresses
+ * @return array of OrderAndTraderInfo
*/
public async getOrdersAndTradersInfoAsync(
orders: SignedOrder[],
takerAddresses: string[],
- ): Promise<OrdersAndTradersInfo> {
+ ): Promise<OrderAndTraderInfo[]> {
assert.doesConformToSchema('orders', orders, schemas.signedOrdersSchema);
_.forEach(takerAddresses, (takerAddress, index) =>
assert.isETHAddressHex(`takerAddresses[${index}]`, takerAddress),
@@ -61,10 +61,15 @@ export class OrderValidatorWrapper extends ContractWrapper {
orders,
takerAddresses,
);
- const result = {
- ordersInfo: ordersAndTradersInfo[0],
- tradersInfo: ordersAndTradersInfo[1],
- };
+ const orderInfos = ordersAndTradersInfo[0];
+ const traderInfos = ordersAndTradersInfo[1];
+ const result = _.map(orderInfos, (orderInfo, index) => {
+ const traderInfo = traderInfos[index];
+ return {
+ orderInfo,
+ traderInfo,
+ };
+ });
return result;
}
/**
diff --git a/packages/contract-wrappers/src/types.ts b/packages/contract-wrappers/src/types.ts
index c51e0ae48..e0b12b7c9 100644
--- a/packages/contract-wrappers/src/types.ts
+++ b/packages/contract-wrappers/src/types.ts
@@ -200,11 +200,6 @@ export interface TraderInfo {
takerZrxAllowance: BigNumber;
}
-export interface OrdersAndTradersInfo {
- ordersInfo: OrderInfo[];
- tradersInfo: TraderInfo[];
-}
-
export interface OrderAndTraderInfo {
orderInfo: OrderInfo;
traderInfo: TraderInfo;