Skip to content

Conversation

@highskore
Copy link
Contributor

No description provided.

@highskore highskore requested review from Copilot and kopy-kat August 4, 2025 11:26
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes signature validation for ERC-1271 by removing the use of toEthSignedMessageHash when validating ERC-1271 signatures and adding it only for UserOperation validation where it's required.

  • Split the signature utility function into signHash (for raw hash signing) and signUserOpHash (for UserOperation hash signing with Ethereum message prefix)
  • Updated signature validation logic to apply Ethereum message hash formatting only for UserOperations, not for ERC-1271 validation
  • Updated test imports to use the appropriate signing function based on the validation context

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

File Description
test/utils/Signature.sol Splits signing function into signHash for raw signatures and signUserOpHash for UserOperation signatures
src/OwnableValidator/OwnableValidator.sol Moves toEthSignedMessageHash application to UserOperation validation only, removes it from ERC-1271 validation
src/MultiFactor/MultiFactor.sol Applies toEthSignedMessageHash only for UserOperation validation
Multiple test files Updates imports to use appropriate signing function based on validation context

@kopy-kat kopy-kat merged commit 95e14db into main Aug 7, 2025
1 check passed
@kopy-kat kopy-kat deleted the fix/ownable-validator-hash branch August 7, 2025 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants