From 541f22c21401229d56e5b019df56abf15c8a16d4 Mon Sep 17 00:00:00 2001 From: Carlos Date: Wed, 1 Mar 2023 10:01:50 -0500 Subject: [PATCH] Update contracts/mainnet/connectors/morpho-aave-v3/main.sol I think we can reduce a line like this so that gas fee will be more reduced. Co-authored-by: Shriya Tyagi <47134275+shriyatyagii@users.noreply.github.com> --- contracts/mainnet/connectors/morpho-aave-v3/main.sol | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contracts/mainnet/connectors/morpho-aave-v3/main.sol b/contracts/mainnet/connectors/morpho-aave-v3/main.sol index ab16f88e..5323ea81 100644 --- a/contracts/mainnet/connectors/morpho-aave-v3/main.sol +++ b/contracts/mainnet/connectors/morpho-aave-v3/main.sol @@ -307,7 +307,8 @@ abstract contract MorphoAaveV3 is Helpers, Events { { uint256 _amt = getUint(_getId, _amount); - MORPHO_AAVE_V3.borrow(_tokenAddress, _amt, _onBehalf, _receiver, max_iteration); + address _token = _tokenAddress == ethAddr ? wethAddr : _tokenAddress; + MORPHO_AAVE_V3.borrow(_token, _amt, _onBehalf, _receiver, max_iteration); convertWethToEth(_tokenAddress == ethAddr, TokenInterface(wethAddr), _amt);