mirror of
https://github.com/Instadapp/dsa-connectors-old.git
synced 2024-07-29 22:47:46 +00:00
Fix wrong address bug
This commit is contained in:
parent
3b08bc2651
commit
5318c8ea5b
|
@ -514,7 +514,7 @@ contract CompoundHelpers is Helpers {
|
|||
address _token = address(token) == getWethAddr() ? getEthAddr() : address(token);
|
||||
|
||||
if (amt == uint(-1)) {
|
||||
amt = getMaxBorrow(target, address(token), ctoken, rateMode);
|
||||
amt = getMaxBorrow(target, _token, ctoken, rateMode);
|
||||
}
|
||||
|
||||
(uint feeAmt, uint _amt) = calculateFee(amt, fee, true);
|
||||
|
@ -635,7 +635,7 @@ contract AaveV1Helpers is CompoundHelpers {
|
|||
address _token = address(token) == getWethAddr() ? getEthAddr() : address(token);
|
||||
|
||||
if (amt == uint(-1)) {
|
||||
amt = getMaxBorrow(target, address(token), ctoken, paybackRateMode);
|
||||
amt = getMaxBorrow(target, _token, ctoken, paybackRateMode);
|
||||
}
|
||||
|
||||
(uint feeAmt, uint _amt) = calculateFee(amt, fee, true);
|
||||
|
|
Loading…
Reference in New Issue
Block a user