diff options
Diffstat (limited to 'packages/contracts/src/utils/formatters.ts')
-rw-r--r-- | packages/contracts/src/utils/formatters.ts | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/packages/contracts/src/utils/formatters.ts b/packages/contracts/src/utils/formatters.ts index b25dec27c..32e4787d6 100644 --- a/packages/contracts/src/utils/formatters.ts +++ b/packages/contracts/src/utils/formatters.ts @@ -2,6 +2,7 @@ import { SignedOrder } from '@0xproject/types'; import { BigNumber } from '@0xproject/utils'; import * as _ from 'lodash'; +import { constants } from './constants'; import { orderUtils } from './order_utils'; import { BatchCancelOrders, BatchFillOrders, MarketBuyOrders, MarketSellOrders } from './types'; @@ -31,10 +32,7 @@ export const formatters = { _.forEach(signedOrders, (signedOrder, i) => { const orderWithoutExchangeAddress = orderUtils.getOrderWithoutExchangeAddress(signedOrder); if (i !== 0) { - orderWithoutExchangeAddress.takerAssetData = `0x${_.repeat( - '0', - signedOrders[0].takerAssetData.length - 2, - )}`; + orderWithoutExchangeAddress.takerAssetData = constants.NULL_BYTES; } marketSellOrders.orders.push(orderWithoutExchangeAddress); marketSellOrders.signatures.push(signedOrder.signature); @@ -50,10 +48,7 @@ export const formatters = { _.forEach(signedOrders, (signedOrder, i) => { const orderWithoutExchangeAddress = orderUtils.getOrderWithoutExchangeAddress(signedOrder); if (i !== 0) { - orderWithoutExchangeAddress.makerAssetData = `0x${_.repeat( - '0', - signedOrders[0].makerAssetData.length - 2, - )}`; + orderWithoutExchangeAddress.makerAssetData = constants.NULL_BYTES; } marketBuyOrders.orders.push(orderWithoutExchangeAddress); marketBuyOrders.signatures.push(signedOrder.signature); |