fix: remove account dependency from credId#31
Conversation
There was a problem hiding this comment.
Pull request overview
This PR removes the account address dependency from credential ID generation in the WebAuthnValidator module. The primary change is to the generateCredentialId function, which now only takes pubKeyX and pubKeyY as parameters instead of also requiring the account address. This simplifies credential ID generation and makes credentials more portable across accounts.
Key Changes:
- Modified
generateCredentialIdto use only public key coordinates, removing the account parameter - Updated
validateSignatureWithDatato decode onlyWebAuthVerificationContextinstead of also decoding the account address - Adjusted all test files to match the new credential ID generation signature
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/WebAuthnValidator/WebAuthnValidator.sol |
Updated generateCredentialId function signature to remove account parameter; updated all internal calls to match; modified validateSignatureWithData to not decode account address from data parameter |
test/WebAuthnValidator/unit/concrete/WebAuthnValidator.t.sol |
Updated credential ID generation calls throughout tests; reordered test data structures to maintain consistency; consolidated multi-line struct initializations for readability |
test/WebAuthnValidator/integration/WebAuthnValidator.t.sol |
Updated credential ID generation calls; consolidated struct initializations and function call formatting for consistency |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 4 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.