mirror of
https://github.com/Instadapp/dsa-connectors.git
synced 2024-07-29 22:37:00 +00:00
Update contracts/mainnet/connectors/aave/v2/main.sol
Co-authored-by: Thrilok kumar <thrilok2000@gmail.com>
This commit is contained in:
parent
503c541d66
commit
d8ce48fbe9
|
@ -200,7 +200,7 @@ abstract contract AaveResolver is Events, Helpers {
|
|||
TokenInterface tokenContract = TokenInterface(_token);
|
||||
|
||||
if (_amt == uint(-1)) {
|
||||
uint _amtDSA = isEth ? onBehalfOf.balance : tokenContract.balanceOf(onBehalfOf);
|
||||
uint _amtDSA = isEth ? address(this).balance : tokenContract.balanceOf(address(this));
|
||||
uint _amtDebt = getOnBehalfOfPaybackBalance(_token, rateMode, onBehalfOf);
|
||||
_amt = _amtDSA <= _amtDebt ? _amtDSA : _amtDebt;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user