mirror of
https://github.com/Instadapp/dsa-connectors-old.git
synced 2024-07-29 22:47:46 +00:00
maker connector payback debt issue
This commit is contained in:
parent
076a836c03
commit
085c58dabb
|
@ -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
1046
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user