From b5a791a86b7cc73ee15ddd41007050d866fabf89 Mon Sep 17 00:00:00 2001 From: vgorkavenko Date: Thu, 9 Nov 2023 11:34:06 +0400 Subject: [PATCH] chore: comment --- src/CSAccounting.sol | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/CSAccounting.sol b/src/CSAccounting.sol index 992d60db..a9abe070 100644 --- a/src/CSAccounting.sol +++ b/src/CSAccounting.sol @@ -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( @@ -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(