Switched NULL_ADDRESS to NULL_BYTES
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user