Skip to content

Commit

Permalink
👷 replaced ternary logic in unwind
Browse files Browse the repository at this point in the history
  • Loading branch information
moss-eth committed Oct 30, 2024
1 parent 0638d65 commit 2b4be6c
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/Zap.sol
Original file line number Diff line number Diff line change
Expand Up @@ -503,12 +503,9 @@ contract Zap is Reentrancy, Errors, Flush(msg.sender) {
// i.e., USDe -(swap)-> USDC -(repay)-> Aave
// i.e., USDC -(repay)-> Aave
// whatever collateral amount is remaining is returned to the caller
if (_collateral == USDC) {
unwound -= _flashloan;
} else {
unwound -= _swapAmountIn;
odosSwap(_collateral, _swapAmountIn, _path);
}
unwound -= _collateral == USDC
? _flashloan
: odosSwap(_collateral, _swapAmountIn, _path);

/// @notice the path and max amount in must take into consideration:
/// (1) Aave flashloan amount
Expand Down

0 comments on commit 2b4be6c

Please sign in to comment.