Skip to content

Commit ed644cd

Browse files
committed
chore: ID-4134: fix review comments
1 parent 7aeb11b commit ed644cd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/contracts/modules/commons/ModuleAuthDynamic.sol

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ abstract contract ModuleAuthDynamic is ModuleAuthUpgradable {
1818
address public immutable IMMUTABLE_SIGNER_CONTRACT;
1919

2020
constructor(address _factory, address _startupWalletImpl, address _immutableSignerContract) {
21+
require(_immutableSignerContract != address(0), "ModuleAuthDynamic#constructor: INVALID_SIGNER_ADDRESS");
2122
// Build init code hash of the deployed wallets using that module
2223
bytes32 initCodeHash = keccak256(abi.encodePacked(Wallet.creationCode, uint256(uint160(_startupWalletImpl))));
2324

@@ -136,8 +137,8 @@ constructor(address _factory, address _startupWalletImpl, address _immutableSign
136137
revert("ModuleAuthDynamic#_signatureValidation INVALID_FLAG");
137138
}
138139

139-
// Defensive check: compare extracted address with target address
140-
if (IMMUTABLE_SIGNER_CONTRACT != address(0) && addr == IMMUTABLE_SIGNER_CONTRACT) {
140+
// Check if this signer is the immutable signer contract
141+
if (addr == IMMUTABLE_SIGNER_CONTRACT) {
141142
immutableSignerContractFound = true;
142143
}
143144

0 commit comments

Comments
 (0)