@0x/contracts-asset-proxy: Tweak IUniswapExchangeFactory.

This commit is contained in:
Lawrence Forman 2019-11-16 00:26:01 -05:00
parent d02db3864e
commit 27fb51d37f
3 changed files with 6 additions and 4 deletions

View File

@ -210,7 +210,9 @@ contract UniswapBridge is
if (fromTokenAddress == address(getWethContract())) {
exchangeTokenAddress = toTokenAddress;
}
exchange = getUniswapExchangeFactoryContract().getExchange(exchangeTokenAddress);
exchange = IUniswapExchange(
getUniswapExchangeFactoryContract().getExchange(exchangeTokenAddress)
);
require(address(exchange) != address(0), "NO_UNISWAP_EXCHANGE_FOR_TOKEN");
return exchange;
}

View File

@ -28,5 +28,5 @@ interface IUniswapExchangeFactory {
function getExchange(address tokenAddress)
external
view
returns (IUniswapExchange);
returns (address);
}

View File

@ -407,9 +407,9 @@ contract TestUniswapBridge is
function getExchange(address tokenAddress)
external
view
returns (IUniswapExchange)
returns (address)
{
return IUniswapExchange(_testExchanges[tokenAddress]);
return address(_testExchanges[tokenAddress]);
}
// @dev Use `wethToken`.