mirror of
https://github.com/Instadapp/smart-contract.git
synced 2024-07-29 22:08:07 +00:00
Fixed address error.
This commit is contained in:
parent
e30103a261
commit
31d6b27eae
|
@ -175,7 +175,7 @@ contract Helpers is DSMath {
|
||||||
*/
|
*/
|
||||||
function getCDPOwner(uint cdpNum) public view returns (address lad) {
|
function getCDPOwner(uint cdpNum) public view returns (address lad) {
|
||||||
bytes32 cup = bytes32(cdpNum);
|
bytes32 cup = bytes32(cdpNum);
|
||||||
TubInterface tub = TubInterface(getPriceFeedAddress());
|
TubInterface tub = TubInterface(getSaiTubAddress());
|
||||||
(lad,,,) = tub.cups(cup);
|
(lad,,,) = tub.cups(cup);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -220,7 +220,7 @@ contract Helpers is DSMath {
|
||||||
* @dev swapping given ETH with MKR
|
* @dev swapping given ETH with MKR
|
||||||
* @param reqDAI is the ETH to swap with MKR
|
* @param reqDAI is the ETH to swap with MKR
|
||||||
*/
|
*/
|
||||||
function payMKRfromETH(uint feesMKR, uint deadline) public payable returns(uint ethSold) {
|
function swapMKRviaETH(uint feesMKR, uint deadline) public payable returns(uint ethSold) {
|
||||||
UniswapExchange mkrExchange = UniswapExchange(getUniswapMKRExchange());
|
UniswapExchange mkrExchange = UniswapExchange(getUniswapMKRExchange());
|
||||||
uint ethPaid = msg.value;
|
uint ethPaid = msg.value;
|
||||||
ethSold = mkrExchange.ethToTokenSwapOutput.value(ethPaid)(feesMKR, deadline);
|
ethSold = mkrExchange.ethToTokenSwapOutput.value(ethPaid)(feesMKR, deadline);
|
||||||
|
@ -233,7 +233,7 @@ contract Helpers is DSMath {
|
||||||
* @dev swapping given DAI with MKR
|
* @dev swapping given DAI with MKR
|
||||||
* @param reqDAI is the DAI to swap with MKR
|
* @param reqDAI is the DAI to swap with MKR
|
||||||
*/
|
*/
|
||||||
function payMKRfromDAI(uint feesMKR, uint maxDAItoPay, uint deadline) public returns(uint daiSold) {
|
function swapMKRviaDAI(uint feesMKR, uint maxDAItoPay, uint deadline) public returns(uint daiSold) {
|
||||||
UniswapExchange daiExchange = UniswapExchange(getUniswapDAIExchange());
|
UniswapExchange daiExchange = UniswapExchange(getUniswapDAIExchange());
|
||||||
TokenInterface daiContract = TokenInterface(getDAIAddress());
|
TokenInterface daiContract = TokenInterface(getDAIAddress());
|
||||||
// (SOWMAY) - Add Allowance and approve check for DAI with maxDAItoPay and transferFrom function
|
// (SOWMAY) - Add Allowance and approve check for DAI with maxDAItoPay and transferFrom function
|
||||||
|
@ -262,7 +262,7 @@ contract Helpers is DSMath {
|
||||||
tub.sai().approve(_otc, uint(-1));
|
tub.sai().approve(_otc, uint(-1));
|
||||||
}
|
}
|
||||||
tub.sai().transferFrom(msg.sender, address(this), saiGovAmt);
|
tub.sai().transferFrom(msg.sender, address(this), saiGovAmt);
|
||||||
swapMKR(saiGovAmt); // swap DAI with MKR
|
swapMKRviaETH(saiGovAmt); // swap DAI with MKR
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user