mirror of
https://github.com/Instadapp/dsa-connectors-old.git
synced 2024-07-29 22:47:46 +00:00
Minor change
This commit is contained in:
parent
cd84e7157d
commit
9a0b2fff32
|
@ -891,7 +891,9 @@ contract AaveV2Helpers is AaveV1Helpers {
|
||||||
uint rateMode
|
uint rateMode
|
||||||
) internal returns (uint) {
|
) internal returns (uint) {
|
||||||
if (amt > 0) {
|
if (amt > 0) {
|
||||||
address _token = address(token) == getWethAddr() ? getEthAddr() : address(token);
|
bool isEth = address(token) == getWethAddr();
|
||||||
|
|
||||||
|
address _token = isEth ? getEthAddr() : address(token);
|
||||||
|
|
||||||
if (amt == uint(-1)) {
|
if (amt == uint(-1)) {
|
||||||
amt = getMaxBorrow(target, _token, ctoken, rateMode);
|
amt = getMaxBorrow(target, _token, ctoken, rateMode);
|
||||||
|
@ -899,8 +901,6 @@ contract AaveV2Helpers is AaveV1Helpers {
|
||||||
|
|
||||||
(uint feeAmt, uint _amt) = calculateFee(amt, fee, true);
|
(uint feeAmt, uint _amt) = calculateFee(amt, fee, true);
|
||||||
|
|
||||||
bool isEth = address(token) == getWethAddr();
|
|
||||||
|
|
||||||
aave.borrow(address(token), _amt, rateMode, getReferralCode(), address(this));
|
aave.borrow(address(token), _amt, rateMode, getReferralCode(), address(this));
|
||||||
convertWethToEth(isEth, token, amt);
|
convertWethToEth(isEth, token, amt);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user