-
Notifications
You must be signed in to change notification settings - Fork 3
feat: add externaldisputeid, make dispute null if none instead of zero #41
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
Conversation
WalkthroughThese updates modify the Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Subgraph
participant GraphQL Schema as Schema
participant Subgraph Logic as Logic
Note over Client,Subgraph: Before Changes
Client->>Schema: Submit Dispute Request
Schema-->>Logic: Handle Request
Logic->>Logic: Set disputeID to ZERO
Logic-->>Schema: Response
Schema-->>Client: Acknowledgment
Note over Client,Subgraph: After Changes
Client->>Schema: Submit Dispute Request
Schema-->>Logic: Handle Request
Logic->>Logic: Set externalDisputeID from event
Logic-->>Schema: Nullable disputeID and maintained externalDisputeID
Schema-->>Client: Acknowledgment
Poem
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 Configration File (
|
❌ Deploy Preview for curate-v2 failed. Why did it fail? →
|
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: 0
Outside diff range and nitpick comments (1)
subgraph/src/Curate.ts (1)
Line range hint
2-2
: Consider renaming theBigInt
import to avoid shadowing the globalBigInt
object, which could lead to confusion.- import { BigInt, json, log } from "@graphprotocol/graph-ts"; + import { BigInt as GraphBigInt, json, log } from "@graphprotocol/graph-ts";
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- subgraph/schema.graphql (1 hunks)
- subgraph/src/Curate.ts (1 hunks)
- subgraph/src/entities/Request.ts (1 hunks)
Additional context used
Biome
subgraph/src/Curate.ts
[error] 2-2: Do not shadow the global "BigInt" property. (lint/suspicious/noShadowRestrictedNames)
Consider renaming this variable. It's easy to confuse the origin of variables when they're named after a known global.
Additional comments not posted (3)
subgraph/src/entities/Request.ts (1)
Line range hint
14-20
: The removal of settingrequest.disputeID
toZERO
aligns with the PR objective to handle cases where there is no dispute. Consider adding a comment to explain whydisputeID
is not set here for future maintainability.subgraph/schema.graphql (1)
166-168
: The schema changes to makedisputeID
nullable and addexternalDisputeID
are correctly implemented. Ensure all related queries and mutations are updated to handle these changes.subgraph/src/Curate.ts (1)
287-287
: Correctly implemented the assignment ofexternalDisputeID
in thehandleRequestChallenged
function.
this is solved by harmeet in another PR that he will push soon. |
if approved, to be redeployed onto the multisig subgraph
PR-Codex overview
This PR adds functionality to track external dispute IDs in requests and updates related fields in the data model.
Detailed summary
externalDisputeID
field toRequest
entityCurate.ts
to includerequest.externalDisputeID
Request.ts
to removedisputeID
and addexternalDisputeID
schema.graphql
to reflect changes inRequest
entitySummary by CodeRabbit
New Features
externalDisputeID
field toRequest
type, improving tracking of external disputes.Bug Fixes
disputeID
field to allownull
values, enhancing data flexibility.Improvements
handleRequestChallenged
function to handleexternalDisputeID
for better dispute management.