Fix the bug making it impossible to specify the custom ZRX address
This commit is contained in:
		@@ -191,6 +191,7 @@ export class ZeroEx {
 | 
				
			|||||||
            this._abiDecoder,
 | 
					            this._abiDecoder,
 | 
				
			||||||
            this.token,
 | 
					            this.token,
 | 
				
			||||||
            config.exchangeContractAddress,
 | 
					            config.exchangeContractAddress,
 | 
				
			||||||
 | 
					            config.zrxContractAddress,
 | 
				
			||||||
        );
 | 
					        );
 | 
				
			||||||
        this.tokenRegistry = new TokenRegistryWrapper(
 | 
					        this.tokenRegistry = new TokenRegistryWrapper(
 | 
				
			||||||
            this._web3Wrapper,
 | 
					            this._web3Wrapper,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -87,11 +87,13 @@ export class ExchangeWrapper extends ContractWrapper {
 | 
				
			|||||||
        abiDecoder: AbiDecoder,
 | 
					        abiDecoder: AbiDecoder,
 | 
				
			||||||
        tokenWrapper: TokenWrapper,
 | 
					        tokenWrapper: TokenWrapper,
 | 
				
			||||||
        contractAddressIfExists?: string,
 | 
					        contractAddressIfExists?: string,
 | 
				
			||||||
 | 
					        zrxContractAddressIfExists?: string,
 | 
				
			||||||
    ) {
 | 
					    ) {
 | 
				
			||||||
        super(web3Wrapper, networkId, abiDecoder);
 | 
					        super(web3Wrapper, networkId, abiDecoder);
 | 
				
			||||||
        this._tokenWrapper = tokenWrapper;
 | 
					        this._tokenWrapper = tokenWrapper;
 | 
				
			||||||
        this._orderValidationUtils = new OrderValidationUtils(this);
 | 
					        this._orderValidationUtils = new OrderValidationUtils(this);
 | 
				
			||||||
        this._contractAddressIfExists = contractAddressIfExists;
 | 
					        this._contractAddressIfExists = contractAddressIfExists;
 | 
				
			||||||
 | 
					        this._zrxContractAddressIfExists = zrxContractAddressIfExists;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * Returns the unavailable takerAmount of an order. Unavailable amount is defined as the total
 | 
					     * Returns the unavailable takerAmount of an order. Unavailable amount is defined as the total
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -290,6 +290,7 @@ export interface OrderStateWatcherConfig {
 | 
				
			|||||||
 * networkId: The id of the underlying ethereum network your provider is connected to. (1-mainnet, 42-kovan, 50-testrpc)
 | 
					 * networkId: The id of the underlying ethereum network your provider is connected to. (1-mainnet, 42-kovan, 50-testrpc)
 | 
				
			||||||
 * gasPrice: Gas price to use with every transaction
 | 
					 * gasPrice: Gas price to use with every transaction
 | 
				
			||||||
 * exchangeContractAddress: The address of an exchange contract to use
 | 
					 * exchangeContractAddress: The address of an exchange contract to use
 | 
				
			||||||
 | 
					 * zrxContractAddress: The address of the ZRX contract to use
 | 
				
			||||||
 * tokenRegistryContractAddress: The address of a token registry contract to use
 | 
					 * tokenRegistryContractAddress: The address of a token registry contract to use
 | 
				
			||||||
 * tokenTransferProxyContractAddress: The address of the token transfer proxy contract to use
 | 
					 * tokenTransferProxyContractAddress: The address of the token transfer proxy contract to use
 | 
				
			||||||
 * orderWatcherConfig: All the configs related to the orderWatcher
 | 
					 * orderWatcherConfig: All the configs related to the orderWatcher
 | 
				
			||||||
@@ -298,6 +299,7 @@ export interface ZeroExConfig {
 | 
				
			|||||||
    networkId: number;
 | 
					    networkId: number;
 | 
				
			||||||
    gasPrice?: BigNumber;
 | 
					    gasPrice?: BigNumber;
 | 
				
			||||||
    exchangeContractAddress?: string;
 | 
					    exchangeContractAddress?: string;
 | 
				
			||||||
 | 
					    zrxContractAddress?: string;
 | 
				
			||||||
    tokenRegistryContractAddress?: string;
 | 
					    tokenRegistryContractAddress?: string;
 | 
				
			||||||
    tokenTransferProxyContractAddress?: string;
 | 
					    tokenTransferProxyContractAddress?: string;
 | 
				
			||||||
    orderWatcherConfig?: OrderStateWatcherConfig;
 | 
					    orderWatcherConfig?: OrderStateWatcherConfig;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user