bug fixed in mcd migrate

This commit is contained in:
Thrilok Kumar 2019-11-19 06:20:48 +05:30
parent b0d180361c
commit 65641f2c37

View File

@ -181,7 +181,7 @@ contract Helpers is DSMath {
} }
/** /**
* @dev get Compound ETH Address * @dev get ETH Address
*/ */
function getETHAddress() public pure returns (address ethAddr) { function getETHAddress() public pure returns (address ethAddr) {
ethAddr = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; // main ethAddr = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; // main
@ -328,7 +328,8 @@ contract MKRSwapper is LiquidityResolver {
if (tokenAddr == getETHAddress()) { if (tokenAddr == getETHAddress()) {
mkrEx.ethToTokenSwapOutput.value(srcAmt)(govFee, uint(1899063809)); mkrEx.ethToTokenSwapOutput.value(srcAmt)(govFee, uint(1899063809));
} else if (tokenAddr != getSaiAddress() && tokenAddr != getDaiAddress()) { } else {
if (tokenAddr != getSaiAddress() && tokenAddr != getDaiAddress()) {
require(TokenInterface(tokenAddr).transferFrom(msg.sender, address(this), srcAmt), "not-approved-yet"); require(TokenInterface(tokenAddr).transferFrom(msg.sender, address(this), srcAmt), "not-approved-yet");
} }
address buyTknExAddr = UniswapFactoryInterface(getUniFactoryAddr()).getExchange(tokenAddr); address buyTknExAddr = UniswapFactoryInterface(getUniFactoryAddr()).getExchange(tokenAddr);
@ -342,6 +343,7 @@ contract MKRSwapper is LiquidityResolver {
mkr mkr
); );
} }
}
} }