File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -251,9 +251,10 @@ contract EulerSwapPeriphery is IEulerSwapPeriphery {
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
+ (IEVault vault0 , IEVault vault1 ) = (IEVault (es.vault0 ()), IEVault (es.vault1 ()));
254
255
// Supply caps on input
255
256
{
256
- IEVault vault = IEVault (asset0IsInput ? es. vault0 () : es. vault1 () );
257
+ IEVault vault = IEVault (asset0IsInput ? vault0 : vault1);
257
258
uint256 maxDeposit = vault.debtOf (eulerAccount) + vault.maxDeposit (eulerAccount);
258
259
if (maxDeposit < inLimit) inLimit = maxDeposit;
259
260
}
@@ -267,7 +268,7 @@ contract EulerSwapPeriphery is IEulerSwapPeriphery {
267
268
268
269
// Remaining cash and borrow caps in output
269
270
{
270
- IEVault vault = IEVault (asset0IsInput ? es. vault1 () : es. vault0 () );
271
+ IEVault vault = IEVault (asset0IsInput ? vault1 : vault0);
271
272
272
273
uint256 cash = vault.cash ();
273
274
if (cash < outLimit) outLimit = cash;
You can’t perform that action at this time.
0 commit comments