Switched NULL_ADDRESS to NULL_BYTES

This commit is contained in:
David Sun
2019-07-24 10:36:58 -07:00
parent 8bb3fb5bb3
commit 9977626de0
2 changed files with 4 additions and 2 deletions

View File

@@ -10,6 +10,7 @@ import {
SwapQuoterOpts,
} from './types';
const NULL_BYTES = '0x';
const NULL_ADDRESS = '0x0000000000000000000000000000000000000000';
const MAINNET_NETWORK_ID = 1;
const ONE_SECOND_MS = 1000;
@@ -44,6 +45,7 @@ const DEFAULT_LIQUIDITY_REQUEST_OPTS: LiquidityRequestOpts = {
};
export const constants = {
NULL_BYTES,
ZERO_AMOUNT: new BigNumber(0),
NULL_ADDRESS,
MAINNET_NETWORK_ID,

View File

@@ -76,9 +76,9 @@ export const swapQuoteConsumerUtils = {
return _.map(orders, (order: SignedOrder, index: number) => {
const optimizedOrder = _.clone(order);
if (operation === MarketOperation.Sell && index !== 0) {
optimizedOrder.takerAssetData = constants.NULL_ADDRESS;
optimizedOrder.takerAssetData = constants.NULL_BYTES;
} else if (index !== 0) {
optimizedOrder.makerAssetData = constants.NULL_ADDRESS;
optimizedOrder.makerAssetData = constants.NULL_BYTES;
}
return optimizedOrder;
});