@@ -117,15 +117,15 @@ contract SlashEscrowFactory is Initializable, SlashEscrowFactoryStorage, Ownable
117
117
*/
118
118
119
119
/// @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 () );
122
122
_paused[operatorSet.key ()][slashId] = true ;
123
123
emit EscrowPaused (operatorSet, slashId);
124
124
}
125
125
126
126
/// @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 () );
129
129
_paused[operatorSet.key ()][slashId] = false ;
130
130
emit EscrowUnpaused (operatorSet, slashId);
131
131
}
@@ -208,16 +208,6 @@ contract SlashEscrowFactory is Initializable, SlashEscrowFactoryStorage, Ownable
208
208
emit GlobalEscrowDelaySet (delay);
209
209
}
210
210
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
-
221
211
/**
222
212
* @notice Deploys a `SlashEscrow`
223
213
* @param operatorSet The operator set whose slash escrow is being deployed.
@@ -363,7 +353,7 @@ contract SlashEscrowFactory is Initializable, SlashEscrowFactoryStorage, Ownable
363
353
364
354
/// @inheritdoc ISlashEscrowFactory
365
355
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) ;
367
357
}
368
358
369
359
/// @inheritdoc ISlashEscrowFactory
0 commit comments