Skip to content

Commit

Permalink
[#4] Remove unnecessary conversion to address, update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
akshay-ap committed Jun 30, 2023
1 parent 65a45ea commit 76e6833
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions contracts/SafeProtocolMediator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,7 @@ contract SafeProtocolMediator is ISafeProtocolMediator {
0
);

// Need to revisit the approach below. If some actions fail, the transaction stiil succeeds.
// With current approach, even if one action fails, `data` will be empty bytes even for successful
// actions.
// Even if one action fails, revert the transaction.
if (!isActionSuccessful) {
revert ActionExecutionFailed(address(safe), transaction.metaHash, i);
} else {
Expand Down Expand Up @@ -142,13 +140,13 @@ contract SafeProtocolMediator is ISafeProtocolMediator {
enabledModules[msg.sender][SENTINEL_MODULES] = ModuleAccessInfo(false, SENTINEL_MODULES);
}

enabledModules[msg.sender][address(module)] = ModuleAccessInfo(
enabledModules[msg.sender][module] = ModuleAccessInfo(
allowRootAccess,
enabledModules[msg.sender][SENTINEL_MODULES].nextModulePointer
);
enabledModules[msg.sender][SENTINEL_MODULES] = ModuleAccessInfo(false, address(module));
enabledModules[msg.sender][SENTINEL_MODULES] = ModuleAccessInfo(false, module);

emit ModuleEnabled(msg.sender, address(module), allowRootAccess);
emit ModuleEnabled(msg.sender, module, allowRootAccess);
}

/**
Expand Down

0 comments on commit 76e6833

Please sign in to comment.