-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
integrate decrypt attestation secrets #56
Conversation
WalkthroughThe changes include updates to TypeScript interfaces, the addition of new interfaces for revocation messages, and modifications to the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant IdentifiersComponent
participant DecryptMutationHook
participant APIService
User->>IdentifiersComponent: Clicks "Reveal"
IdentifiersComponent->>DecryptMutationHook: Trigger decryption
DecryptMutationHook->>APIService: Call decryptAttestationsSecret(uid, siweJwt, chainId)
APIService-->>DecryptMutationHook: Return decrypted secret
DecryptMutationHook-->>IdentifiersComponent: Update identifier with secret
IdentifiersComponent-->>User: Display decrypted secret
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (5)
- src/interfaces/index.ts (3 hunks)
- src/pages/Identifiers/Attestation/Attestation.tsx (1 hunks)
- src/pages/Identifiers/Identifiers.tsx (10 hunks)
- src/services/api/eas/index.ts (2 hunks)
- src/services/api/eas/query.ts (2 hunks)
Additional comments not posted (15)
src/services/api/eas/index.ts (1)
15-19
: LGTM!The
DecryptAttestationsSecretParams
interface is correctly defined and follows TypeScript conventions.The code changes are approved.
src/interfaces/index.ts (3)
24-25
: LGTM!The
attester
property is correctly made optional in theAttestMessage
interface.The code changes are approved.
35-40
: LGTM!The
RevokeMessage
interface is correctly defined and follows TypeScript conventions.The code changes are approved.
65-71
: LGTM!The
RevokePayload
interface is correctly defined and follows TypeScript conventions.The code changes are approved.
src/pages/Identifiers/Attestation/Attestation.tsx (1)
16-16
: Verify the correctness of the new import path.Ensure that the
useLinkIdentifierMutation
hook is correctly imported from the new module path and that its function signature and behavior remain consistent.Run the following script to verify the existence of the
useLinkIdentifierMutation
in the new module path:Verification successful
Import path is correct for
useLinkIdentifierMutation
.The
useLinkIdentifierMutation
function is correctly imported fromsrc/services/api/eas/query.ts
, and its definition is consistent with the import statement.
src/pages/Identifiers/Attestation/Attestation.tsx
: Correct import path foruseLinkIdentifierMutation
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the existence of the `useLinkIdentifierMutation` in the new module path. # Test: Search for the function definition. Expect: The function should be defined in the new module path. rg --type python -A 5 $'useLinkIdentifierMutation' src/services/api/eas/queryLength of output: 107
Script:
#!/bin/bash # Description: Verify the existence of the `useLinkIdentifierMutation` in the new module path. # Test: Search for the function definition. Expect: The function should be defined in the new module path. rg --type ts -A 5 'useLinkIdentifierMutation' src/services/api/eas/queryLength of output: 139
Script:
#!/bin/bash # Description: Search for the `useLinkIdentifierMutation` function across the entire repository. # Test: Search for the function definition. Expect: The function should be defined somewhere in the repository. rg --type ts -A 5 'useLinkIdentifierMutation'Length of output: 1480
src/pages/Identifiers/Identifiers.tsx (10)
49-51
: LGTM!The new properties
isRevealedPending
,isRevealed
, andonReveal
are correctly defined in theIdentifierItemProps
interface.The code changes are approved.
Line range hint
59-96
: LGTM!The new properties
isRevealedPending
,isRevealed
, andonReveal
are correctly used in theIdentifierItem
component.The code changes are approved.
150-151
: LGTM!The new mutation hook
useDecryptAttestationsSecretMutation
is correctly used in theIdentifiers
component.The code changes are approved.
153-159
: LGTM!The new states
loadingIdentifiers
,revealedIdentifiers
, andrevealing
are correctly defined in theIdentifiers
component.The code changes are approved.
161-189
: LGTM!The new
processAttestations
function is correctly defined and used in theIdentifiers
component.The code changes are approved.
209-217
: LGTM!The new
initialRevealedState
is correctly defined and used in theIdentifiers
component.The code changes are approved.
246-295
: LGTM!The new
handleReveal
function is correctly defined and used in theIdentifiers
component.The code changes are approved.
Line range hint
303-357
: LGTM!The changes to the
revokeIdentifier
function are correctly implemented in theIdentifiers
component.The code changes are approved.
380-383
: LGTM!The new properties
isLoading
,isRevealedPending
,isRevealed
, andonReveal
are correctly used in theIdentifierItem
component.The code changes are approved.
32-35
: Verify the correctness of the new import paths.Ensure that the
useDecryptAttestationsSecretMutation
anduseRevokeIdentifierMutation
hooks are correctly imported from the new module path and that their function signatures and behaviors remain consistent.Run the following script to verify the existence of the
useDecryptAttestationsSecretMutation
anduseRevokeIdentifierMutation
in the new module path:Verification successful
Import paths are correct and verified.
The
useDecryptAttestationsSecretMutation
anduseRevokeIdentifierMutation
hooks are correctly imported fromsrc/services/api/eas/query.ts
, and their usage insrc/pages/Identifiers/Identifiers.tsx
is appropriate. No issues found.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the existence of the `useDecryptAttestationsSecretMutation` and `useRevokeIdentifierMutation` in the new module path. # Test: Search for the function definitions. Expect: The functions should be defined in the new module path. rg --type python -A 5 $'useDecryptAttestationsSecretMutation' src/services/api/eas/query rg --type python -A 5 $'useRevokeIdentifierMutation' src/services/api/eas/queryLength of output: 228
Script:
#!/bin/bash # Description: Verify the existence of the `useDecryptAttestationsSecretMutation` and `useRevokeIdentifierMutation` in the new module path. # Test: Search for the function definitions. Expect: The functions should be defined in the new module path. rg --type ts -A 5 'useDecryptAttestationsSecretMutation' src/services/api/eas/query rg --type ts -A 5 'useRevokeIdentifierMutation' src/services/api/eas/queryLength of output: 292
Script:
#!/bin/bash # Description: Search for the definitions of `useDecryptAttestationsSecretMutation` and `useRevokeIdentifierMutation` across the entire codebase. # Test: Search for the function definitions. Expect: The functions should be defined somewhere in the codebase. rg --type ts -A 5 'useDecryptAttestationsSecretMutation' rg --type ts -A 5 'useRevokeIdentifierMutation'Length of output: 2539
Summary by CodeRabbit
New Features
Bug Fixes
Documentation