mirror of
https://github.com/Instadapp/smart-contract.git
synced 2024-07-29 22:08:07 +00:00
small code refactoring
This commit is contained in:
parent
98fc58bcc8
commit
95c58095e3
|
@ -583,7 +583,7 @@ contract Bridge is CompoundResolver {
|
|||
/**
|
||||
* @dev convert Maker CDP into Compound Collateral
|
||||
*/
|
||||
function makerToCompound(uint cdpId, uint ethQty, uint daiQty) public {
|
||||
function makerToCompound(uint cdpId, uint ethQty, uint daiQty) external {
|
||||
(uint ethAmt, uint daiDebt) = checkCDP(bytes32(cdpId), ethQty, daiQty);
|
||||
uint daiAmt = wipeAndFreeMaker(cdpId, ethAmt, daiDebt); // Getting Liquidity inside Wipe function
|
||||
enterMarket(getCETHAddress());
|
||||
|
@ -596,7 +596,7 @@ contract Bridge is CompoundResolver {
|
|||
* @dev convert Compound Collateral into Maker CDP
|
||||
* @param cdpId = 0, if user don't have any CDP
|
||||
*/
|
||||
function compoundToMaker(uint cdpId, uint ethQty, uint daiQty) public {
|
||||
function compoundToMaker(uint cdpId, uint ethQty, uint daiQty) external {
|
||||
uint cdpNum = cdpId > 0 ? cdpId : open();
|
||||
(uint ethCol, uint daiDebt) = checkCompound(ethQty, daiQty);
|
||||
(uint ethAmt, uint daiAmt) = paybackAndRedeemComp(ethCol, daiDebt); // Getting Liquidity inside Wipe function
|
||||
|
@ -605,11 +605,6 @@ contract Bridge is CompoundResolver {
|
|||
emit LogCompoundToMaker(ethAmt, daiAmt);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
contract InstaMakerCompBridge is Bridge {
|
||||
|
||||
function() external payable {}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user