Merged
Conversation
Contributor
Greptile OverviewGreptile SummaryUpdated CLI quote creation command to align with the updated OpenAPI schema by adding discriminator fields to source and destination objects. The changes include:
Confidence Score: 5/5
|
| Filename | Overview |
|---|---|
| cli/src/commands/quotes.ts | Added discriminator fields (sourceType, destinationType) to quote source/destination objects and removed incorrect currency field from account destinations |
Sequence Diagram
sequenceDiagram
participant CLI as CLI User
participant QuotesCmd as quotes.ts
participant GridClient as Grid API
participant Schema as OpenAPI Schema
Note over CLI,Schema: Quote Creation Flow
CLI->>QuotesCmd: quotes create --amount 1000 --lock-side SENDING --source-account InternalAccount:123
QuotesCmd->>QuotesCmd: Validate amount & lock side
QuotesCmd->>QuotesCmd: Build request body with sourceType discriminator
Note over QuotesCmd: NEW: Adds sourceType: "ACCOUNT"
QuotesCmd->>GridClient: POST /quotes with {source: {sourceType: "ACCOUNT", accountId: "..."}}
GridClient->>Schema: Validate against AccountQuoteSource schema
Schema-->>GridClient: ✓ Schema validation passes
GridClient-->>QuotesCmd: Return Quote object
QuotesCmd-->>CLI: Display quote details
Note over CLI,Schema: Alternative: UMA Destination
CLI->>QuotesCmd: quotes create --dest-uma $user@domain.com --dest-currency USD
QuotesCmd->>QuotesCmd: Build destination with destinationType discriminator
Note over QuotesCmd: NEW: Adds destinationType: "UMA_ADDRESS"
QuotesCmd->>GridClient: POST /quotes with {destination: {destinationType: "UMA_ADDRESS", umaAddress: "...", currency: "USD"}}
GridClient->>Schema: Validate against UmaAddressDestination schema
Schema-->>GridClient: ✓ Schema validation passes
GridClient-->>QuotesCmd: Return Quote object
QuotesCmd-->>CLI: Display quote details
pengying
approved these changes
Feb 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.