Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Filipp Makarov authored and Filipp Makarov committed Feb 3, 2025
1 parent 76b5ab4 commit 1e4eab1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion contracts/Nexus.sol
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ contract Nexus is INexus, BaseAccount, ExecutionHelper, ModuleManager, UUPSUpgra
validationData = IValidator(validator).validateUserOp(userOp, userOpHash);
} else {
// If the account is not initialized, check the signature against the account
if (!_isAlreadyInitialized()) {
if (!_hasValidators() && !_hasExecutors()) {
// Check the userOp signature if the validator is not installed (used for EIP7702)
validationData = _checkSelfSignature(op.signature, userOpHash) ? VALIDATION_SUCCESS : VALIDATION_FAILED;
} else {
Expand Down
2 changes: 1 addition & 1 deletion contracts/base/ModuleManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ abstract contract ModuleManager is Storage, EIP712, IModuleManagerEventsAndError
}
} else {
// If the account is not initialized, check the signature against the account
if (!_isAlreadyInitialized()) {
if (!_hasValidators() && !_hasExecutors()) {
// ERC-7739 is not required here as the userOpHash is hashed into the structHash => safe
return _checkSelfSignature(sig, eip712Digest);
} else {
Expand Down

0 comments on commit 1e4eab1

Please sign in to comment.