-
Notifications
You must be signed in to change notification settings - Fork 3
feat: add isPlatformAccount to PaymentInstructions and remove PaymentAccountOrWalletInfo refs #128
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
base: 01-24-feat_flatten_lightningexternalaccountinfo_schema
Are you sure you want to change the base?
Conversation
…AccountOrWalletInfo refs
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Greptile OverviewGreptile SummaryThis PR simplifies the payment account schema architecture by removing the intermediate Key changes:
The refactoring successfully reduces schema complexity while preserving functionality. All 16 files were properly updated with consistent changes, and both bundled outputs (root and Mintlify) reflect the modifications correctly. Confidence Score: 5/5
|
| Filename | Overview |
|---|---|
| openapi/components/schemas/common/PaymentInstructions.yaml | Added isPlatformAccount boolean field to distinguish platform vs customer accounts |
| openapi/components/schemas/common/PaymentFboAccountInfo.yaml | Removed PaymentAccountOrWalletInfo reference and inline-defined accountType as const FBO |
| openapi/components/schemas/common/PaymentLightningInvoiceInfo.yaml | Removed inheritance, changed to standalone object with accountType as const instead of enum |
| openapi/components/schemas/common/PaymentTronWalletInfo.yaml | Removed PaymentAccountOrWalletInfo reference, converted assetType from enum to const USDT |
| openapi/components/schemas/common/PaymentPolygonWalletInfo.yaml | Removed PaymentAccountOrWalletInfo reference, converted assetType from enum to const USDC |
| openapi/components/schemas/common/PaymentBaseWalletInfo.yaml | Removed PaymentAccountOrWalletInfo reference, converted assetType from enum to const USDC |
Sequence Diagram
sequenceDiagram
participant API as API Consumer
participant PI as PaymentInstructions
participant Old as PaymentAccountOrWalletInfo<br/>(Removed)
participant New as Payment*Info Schemas
participant Base as Base*Info Schemas
Note over API,Base: Before: Two-Level Inheritance
API->>PI: Request payment instructions
PI->>Old: accountOrWalletInfo extends
Old->>New: Payment schemas inherit
New->>Base: Base schemas referenced
Note over Old: Discriminator at intermediate layer
Note over API,Base: After: Simplified Direct Inheritance
API->>PI: Request payment instructions
Note over PI: + isPlatformAccount field
PI->>New: accountOrWalletInfo directly references
New->>Base: Payment schemas extend base directly
Note over PI: Discriminator moved to PaymentInstructions
Note over New: accountType: const (was enum)<br/>assetType: const for single-asset wallets

TL;DR
Refactored payment account schemas to simplify the inheritance structure and added platform account identification.
What changed?
PaymentAccountOrWalletInfobase schema and its discriminator patternenumwithconstfor account types and asset types to improve type safetyClabeAccountInfoschema to a more logical position in the schema hierarchyisPlatformAccountboolean field toPaymentInstructionsto distinguish between platform and customer accountsNgnAccountInfoschema to maintain better organization