@@ -117,15 +117,15 @@ contract SlashEscrowFactory is Initializable, SlashEscrowFactoryStorage, Ownable
117117 */
118118
119119 /// @inheritdoc ISlashEscrowFactory
120- function pauseEscrow (OperatorSet calldata operatorSet , uint256 slashId ) external onlyPauser {
121- _checkNewPausedStatus ( operatorSet, slashId, true );
120+ function pauseEscrow (OperatorSet calldata operatorSet , uint256 slashId ) external virtual onlyPauser {
121+ require ( ! _paused[ operatorSet. key ()][ slashId], IPausable. InvalidNewPausedStatus () );
122122 _paused[operatorSet.key ()][slashId] = true ;
123123 emit EscrowPaused (operatorSet, slashId);
124124 }
125125
126126 /// @inheritdoc ISlashEscrowFactory
127- function unpauseEscrow (OperatorSet calldata operatorSet , uint256 slashId ) external onlyUnpauser {
128- _checkNewPausedStatus ( operatorSet, slashId, false );
127+ function unpauseEscrow (OperatorSet calldata operatorSet , uint256 slashId ) external virtual onlyUnpauser {
128+ require (_paused[ operatorSet. key ()][ slashId], IPausable. InvalidNewPausedStatus () );
129129 _paused[operatorSet.key ()][slashId] = false ;
130130 emit EscrowUnpaused (operatorSet, slashId);
131131 }
@@ -208,16 +208,6 @@ contract SlashEscrowFactory is Initializable, SlashEscrowFactoryStorage, Ownable
208208 emit GlobalEscrowDelaySet (delay);
209209 }
210210
211- /// @notice Checks that the new paused status is not the same as the current paused status.
212- /// @dev This is needed for event sanitization.
213- function _checkNewPausedStatus (
214- OperatorSet calldata operatorSet ,
215- uint256 slashId ,
216- bool newPauseStatus
217- ) internal view {
218- require (_paused[operatorSet.key ()][slashId] != newPauseStatus, IPausable.InvalidNewPausedStatus ());
219- }
220-
221211 /**
222212 * @notice Deploys a `SlashEscrow`
223213 * @param operatorSet The operator set whose slash escrow is being deployed.
@@ -363,7 +353,7 @@ contract SlashEscrowFactory is Initializable, SlashEscrowFactoryStorage, Ownable
363353
364354 /// @inheritdoc ISlashEscrowFactory
365355 function isEscrowPaused (OperatorSet calldata operatorSet , uint256 slashId ) public view returns (bool ) {
366- return _paused[operatorSet.key ()][slashId];
356+ return _paused[operatorSet.key ()][slashId] || paused (PAUSED_RELEASE_ESCROW) ;
367357 }
368358
369359 /// @inheritdoc ISlashEscrowFactory
0 commit comments