@@ -319,25 +319,12 @@ abstract contract ModuleManager is AllStorage, EIP712, IModuleManager {
319319 }
320320 }
321321
322- function _tryUninstallFallbacks () internal {
322+ function _uninstallAllFallbacks () internal {
323323 AccountStorage storage ds = _getAccountStorage ();
324324 uint256 len = ds.fallbackSelectors.length ;
325325
326326 for (uint256 i = 0 ; i < len; i++ ) {
327327 bytes4 selector = ds.fallbackSelectors[i];
328- FallbackHandler memory handler = ds.fallbacks[selector];
329-
330- if (address (handler.handler) == address (0 )) continue ;
331-
332- (bool success , bytes memory returnData ) = handler.handler.excessivelySafeCall (
333- gasleft (), 0 , 0 , abi.encodeWithSelector (IModule.onUninstall.selector , abi.encodePacked (selector))
334- );
335- if (! success) {
336- emit ExternalCallFailed (
337- handler.handler, abi.encodeWithSelector (IModule.onUninstall.selector , abi.encodePacked (selector)), returnData
338- );
339- }
340-
341328 ds.fallbacks[selector] = FallbackHandler (address (0 ), CallType.wrap (0x00 ));
342329 }
343330
@@ -531,20 +518,12 @@ abstract contract ModuleManager is AllStorage, EIP712, IModuleManager {
531518 }
532519 }
533520
534- function _tryUninstallPreValidationHook (address hook , uint256 hookType ) internal virtual {
521+ function _uninstallPreValidationHook (address hook , uint256 hookType ) internal virtual {
535522 if (hook == address (0 )) return ;
536523 if (hookType == MODULE_TYPE_PREVALIDATION_HOOK_ERC1271) {
537- try _getAccountStorage ().preValidationHookERC1271.onUninstall ('' ) {}
538- catch {
539- emit PreValidationHookUninstallFailed (hook, '' );
540- }
541524 _setPreValidationHook (hookType, address (0 ));
542525 emit ModuleUninstalled (hookType, hook);
543526 } else if (hookType == MODULE_TYPE_PREVALIDATION_HOOK_ERC4337) {
544- try _getAccountStorage ().preValidationHookERC4337.onUninstall ('' ) {}
545- catch {
546- emit PreValidationHookUninstallFailed (hook, '' );
547- }
548527 _setPreValidationHook (hookType, address (0 ));
549528 emit ModuleUninstalled (hookType, hook);
550529 } else {
0 commit comments