File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -250,11 +250,11 @@ contract EulerSwapPeriphery is IEulerSwapPeriphery {
250
250
251
251
function _getLimits (IEulerSwap es , bool asset0IsInput ) internal view returns (uint256 inLimit , uint256 outLimit ) {
252
252
inLimit = outLimit = type (uint112 ).max;
253
-
253
+ address eulerAccount = es. eulerAccount ();
254
254
// Supply caps on input
255
255
{
256
256
IEVault vault = IEVault (asset0IsInput ? es.vault0 () : es.vault1 ());
257
- uint256 maxDeposit = vault.debtOf (es. eulerAccount ()) + vault.maxDeposit (es. eulerAccount () );
257
+ uint256 maxDeposit = vault.debtOf (eulerAccount) + vault.maxDeposit (eulerAccount);
258
258
if (maxDeposit < inLimit) inLimit = maxDeposit;
259
259
}
260
260
@@ -276,7 +276,7 @@ contract EulerSwapPeriphery is IEulerSwapPeriphery {
276
276
uint256 maxWithdraw = decodeCap (uint256 (borrowCap));
277
277
maxWithdraw = vault.totalBorrows () > maxWithdraw ? 0 : maxWithdraw - vault.totalBorrows ();
278
278
if (maxWithdraw > cash) maxWithdraw = cash;
279
- maxWithdraw += vault.convertToAssets (vault.balanceOf (es. eulerAccount () ));
279
+ maxWithdraw += vault.convertToAssets (vault.balanceOf (eulerAccount));
280
280
if (maxWithdraw < outLimit) outLimit = maxWithdraw;
281
281
}
282
282
}
You can’t perform that action at this time.
0 commit comments