mirror of
https://github.com/Instadapp/smart-contract.git
synced 2024-07-29 22:08:07 +00:00
removed maxEth
This commit is contained in:
parent
af1e0760fa
commit
0d383ee4d3
|
@ -325,13 +325,6 @@ contract GetDetails is MakerHelpers {
|
||||||
uint maxDebtLimit = wdiv(colToUSD, 1500000000000000000) - 10;
|
uint maxDebtLimit = wdiv(colToUSD, 1500000000000000000) - 10;
|
||||||
maxDaiToDraw = sub(maxDebtLimit, daiDebt);
|
maxDaiToDraw = sub(maxDebtLimit, daiDebt);
|
||||||
ethInUSD = usdPerEth;
|
ethInUSD = usdPerEth;
|
||||||
|
|
||||||
(uint expectedRate,) = KyberInterface(getAddressKyber()).getExpectedRate(getAddressETH(), getAddressDAI(), maxColToFree);
|
|
||||||
uint expectedDai = wmul(maxColToFree, expectedRate);
|
|
||||||
if (expectedDai > maxDaiToDraw) {
|
|
||||||
maxColToFree = wmul(maxColToFree, wdiv(maxDaiToDraw, expectedDai));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getSave(uint cdpID, uint ethToSwap) public view returns (uint finalEthCol, uint finalDaiDebt, uint finalColToUSD, bool canSave) {
|
function getSave(uint cdpID, uint ethToSwap) public view returns (uint finalEthCol, uint finalDaiDebt, uint finalColToUSD, bool canSave) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user