maker connector payback debt issue

This commit is contained in:
Samyak Jain 2020-06-30 23:53:51 +10:00
parent 076a836c03
commit 085c58dabb
2 changed files with 767 additions and 287 deletions

View File

@ -592,7 +592,11 @@ contract BasicResolver is MakerHelpers {
address vat = managerContract.vat();
_amt = _amt == uint(-1) ? _getVaultDebt(vat, ilk, urn) : _amt;
uint _maxDebt = _getVaultDebt(vat, ilk, urn);
_amt = _amt == uint(-1) ? _maxDebt : _amt;
require(_maxDebt >= _amt, "paying-excess-debt");
DaiJoinInterface daiJoinContract = DaiJoinInterface(getMcdDaiJoin());
daiJoinContract.dai().approve(getMcdDaiJoin(), _amt);
@ -771,5 +775,5 @@ contract DsrResolver is BasicExtraResolver {
}
contract ConnectMaker is DsrResolver {
string public constant name = "MakerDao-v1.1";
string public constant name = "MakerDao-v1.2";
}

1046
package-lock.json generated

File diff suppressed because it is too large Load Diff