mirror of
https://github.com/Instadapp/dsa-connectors.git
synced 2024-07-29 22:37:00 +00:00
upate repay functions
This commit is contained in:
parent
eb88da9802
commit
b3d1b17adf
|
@ -268,8 +268,8 @@ abstract contract MorphoAaveV3 is Helpers, Events {
|
||||||
returns (string memory _eventName, bytes memory _eventParam)
|
returns (string memory _eventName, bytes memory _eventParam)
|
||||||
{
|
{
|
||||||
uint256 _amt = getUint(_getId, _amount);
|
uint256 _amt = getUint(_getId, _amount);
|
||||||
|
address _token = _tokenAddress == ethAddr ? wethAddr : _tokenAddress;
|
||||||
MORPHO_AAVE_V3.borrow(_tokenAddress, _amt, address(this), _receiver, max_iteration);
|
MORPHO_AAVE_V3.borrow(_token, _amt, address(this), _receiver, max_iteration);
|
||||||
|
|
||||||
convertWethToEth(_tokenAddress == ethAddr, TokenInterface(wethAddr), _amt);
|
convertWethToEth(_tokenAddress == ethAddr, TokenInterface(wethAddr), _amt);
|
||||||
|
|
||||||
|
@ -615,7 +615,7 @@ abstract contract MorphoAaveV3 is Helpers, Events {
|
||||||
|
|
||||||
approve(_tokenContract, address(MORPHO_AAVE_V3), _amt);
|
approve(_tokenContract, address(MORPHO_AAVE_V3), _amt);
|
||||||
|
|
||||||
MORPHO_AAVE_V3.repay(_tokenAddress, _amt, address(this));
|
MORPHO_AAVE_V3.repay(address(_tokenContract), _amt, address(this));
|
||||||
|
|
||||||
setUint(_setId, _amt);
|
setUint(_setId, _amt);
|
||||||
|
|
||||||
|
@ -665,7 +665,7 @@ abstract contract MorphoAaveV3 is Helpers, Events {
|
||||||
|
|
||||||
approve(_tokenContract, address(MORPHO_AAVE_V3), _amt);
|
approve(_tokenContract, address(MORPHO_AAVE_V3), _amt);
|
||||||
|
|
||||||
MORPHO_AAVE_V3.repay(_tokenAddress, _amt, _onBehalf);
|
MORPHO_AAVE_V3.repay(address(_tokenContract), _amt, _onBehalf);
|
||||||
|
|
||||||
setUint(_setId, _amt);
|
setUint(_setId, _amt);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user