Skip to content

Commit

Permalink
chore: comment
Browse files Browse the repository at this point in the history
  • Loading branch information
vgorkavenko committed Nov 9, 2023
1 parent 97e82d7 commit b5a791a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/CSAccounting.sol
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,7 @@ contract CSAccounting is CSAccountingBase, AccessControlEnumerable {
PermitInput calldata permit
) external returns (uint256) {
from = _validateDepositSender(from);
// preventing revert for already used permit
if (_lido().allowance(from, address(this)) < permit.value) {
// solhint-disable-next-line func-named-parameters
_lido().permit(
Expand Down Expand Up @@ -524,6 +525,7 @@ contract CSAccounting is CSAccountingBase, AccessControlEnumerable {
PermitInput calldata permit
) external returns (uint256) {
from = _validateDepositSender(from);
// preventing revert for already used permit
if (WSTETH.allowance(from, address(this)) < permit.value) {
// solhint-disable-next-line func-named-parameters
WSTETH.permit(
Expand Down

0 comments on commit b5a791a

Please sign in to comment.