Skip to content

Commit

Permalink
double check functions, formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ungaro committed Dec 10, 2024
1 parent 267dfcf commit 7d6cf0c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions nest/src/ComponentToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -583,12 +583,11 @@ abstract contract ComponentToken is

// No _burn needed here as shares were already burned in requestRedeem
SafeERC20.safeTransfer(IERC20(asset()), receiver, assets);
emit Withdraw(controller, receiver, controller, assets, shares);
} else {
shares = previewWithdraw(assets);
_burn(msg.sender, shares);
SafeERC20.safeTransfer(IERC20(asset()), receiver, assets);
_withdraw(controller, receiver, controller, assets, shares);
}
emit Withdraw(msg.sender, receiver, msg.sender, assets, shares);
return shares;
}

Expand Down

0 comments on commit 7d6cf0c

Please sign in to comment.