Skip to content

Sync GTQ_ACCOUNT with OpenAPI schema#674

Open
claude[bot] wants to merge 1 commit into
mainfrom
docs/sync-20260709
Open

Sync GTQ_ACCOUNT with OpenAPI schema#674
claude[bot] wants to merge 1 commit into
mainfrom
docs/sync-20260709

Conversation

@claude

@claude claude Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR syncs the Grid Visualizer and Grid Wallet Demo components with the OpenAPI schema for GTQ (Guatemalan Quetzal) accounts:

  • Grid Visualizer account-types.ts: Fixed GTQ_ACCOUNT field specs to match OpenAPI schema. Replaced incorrect phoneNumber field with the required bankAccountType (CHECKING/SAVINGS) and bankName fields.

  • Grid Visualizer currencies.ts: Added missing GTQ (Guatemalan Quetzal) currency entry to the fiat currencies list.

  • Grid Wallet Demo bankAccountFields.generated.ts: Regenerated from OpenAPI spec to include the bankName field that was added in commit 95ded8a.

These changes ensure the UI components correctly reflect the GTQ account requirements defined in GtqAccountInfoBase.yaml.

Test plan

  • Verify Grid Visualizer correctly displays GTQ account fields
  • Verify Grid Wallet Demo form shows all required GTQ fields
  • Run npm run verify:bank-fields in grid-wallet-demo to confirm schema sync

🤖 Generated with Claude Code

The GtqAccountInfoBase.yaml schema defines GTQ_ACCOUNT as requiring
accountNumber, bankAccountType (CHECKING/SAVINGS), and bankName.

Updates:
- Grid Visualizer account-types.ts: replace incorrect phoneNumber field
  with bankAccountType and bankName
- Grid Visualizer currencies.ts: add GTQ (Guatemalan Quetzal) currency
- Grid Wallet Demo bankAccountFields.generated.ts: regenerate to include
  the bankName field that was added in commit 95ded8a

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@claude claude Bot requested review from pengying and shreyav July 9, 2026 09:18
@vercel

vercel Bot commented Jul 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
grid-flow-builder Ready Ready Preview, Comment Jul 9, 2026 9:19am
grid-wallet-demo Ready Ready Preview, Comment Jul 9, 2026 9:19am

Request Review

@greptile-apps

greptile-apps Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR syncs GTQ (Guatemalan Quetzal) account field definitions across the Grid Visualizer and Grid Wallet Demo with the OpenAPI schema, replacing the incorrect phoneNumber field with bankAccountType and bankName, and adds the missing GTQ currency entry.

  • account-types.ts: GTQ_ACCOUNT fields corrected; however JMD_ACCOUNT is missing the bankName field that the regenerated schema now marks as required — the same class of drift this PR is fixing for GTQ.
  • bankAccountFields.generated.ts: Adds bankName to GTQ and JMD accounts, but also contains undocumented INR_ACCOUNT changes: vpa flipped from required: true to required: false and four new optional fields added, leaving the form submittable with no INR fields filled in.
  • currencies.ts: Clean, standalone addition of the GTQ currency entry.

Confidence Score: 3/5

Needs fixes before merging — the JMD visualizer gap and the undocumented INR schema change should both be resolved first.

The GTQ fix and the currencies addition are clean, but two issues require attention: JMD_ACCOUNT in the visualizer is still missing the bankName field that is now required in the generated schema, and the regenerated file silently makes every INR field optional — meaning the wallet demo form will accept a blank INR payment submission where it previously required a VPA.

components/grid-visualizer/src/data/account-types.ts (JMD_ACCOUNT missing bankName) and components/grid-wallet-demo/src/data/bankAccountFields.generated.ts (INR_ACCOUNT vpa requirement change).

Important Files Changed

Filename Overview
components/grid-visualizer/src/data/account-types.ts GTQ_ACCOUNT correctly updated with bankAccountType and bankName; JMD_ACCOUNT is missing the newly-required bankName field that appeared in the regenerated schema.
components/grid-visualizer/src/data/currencies.ts GTQ currency entry added with correct country code, account type, rails, and example person. No issues.
components/grid-wallet-demo/src/data/bankAccountFields.generated.ts GTQ and JMD bankName fields added correctly; INR_ACCOUNT silently changed vpa from required to optional and gained 4 new optional fields—undocumented in the PR and leaves INR payments submittable with all-empty fields.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    OAS[OpenAPI Schema\nGtqAccountInfoBase.yaml] -->|regenerate| GEN[bankAccountFields.generated.ts]
    GEN -->|GTQ: bankName added ✅| GTQ_GEN[GTQ_ACCOUNT\naccountNumber + bankAccountType + bankName]
    GEN -->|JMD: bankName added ✅| JMD_GEN[JMD_ACCOUNT\naccountNumber + branchCode + bankAccountType + bankName]
    GEN -->|INR: vpa required→optional ⚠️\n+ 4 new optional fields| INR_GEN[INR_ACCOUNT\nvpa? + accountNumber? + ifsc? + rail? + bankName?]
    GEN -->|sync| VIZ[account-types.ts\nGrid Visualizer]
    VIZ -->|GTQ fixed ✅| GTQ_VIZ[GTQ_ACCOUNT\naccountNumber + bankAccountType + bankName]
    VIZ -->|bankName missing ❌| JMD_VIZ[JMD_ACCOUNT\naccountNumber + branchCode + bankAccountType]
    VIZ -->|not updated ⚠️| INR_VIZ[INR_ACCOUNT\nvpa only]
    OAS -->|added| CUR[currencies.ts\nGTQ entry ✅]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    OAS[OpenAPI Schema\nGtqAccountInfoBase.yaml] -->|regenerate| GEN[bankAccountFields.generated.ts]
    GEN -->|GTQ: bankName added ✅| GTQ_GEN[GTQ_ACCOUNT\naccountNumber + bankAccountType + bankName]
    GEN -->|JMD: bankName added ✅| JMD_GEN[JMD_ACCOUNT\naccountNumber + branchCode + bankAccountType + bankName]
    GEN -->|INR: vpa required→optional ⚠️\n+ 4 new optional fields| INR_GEN[INR_ACCOUNT\nvpa? + accountNumber? + ifsc? + rail? + bankName?]
    GEN -->|sync| VIZ[account-types.ts\nGrid Visualizer]
    VIZ -->|GTQ fixed ✅| GTQ_VIZ[GTQ_ACCOUNT\naccountNumber + bankAccountType + bankName]
    VIZ -->|bankName missing ❌| JMD_VIZ[JMD_ACCOUNT\naccountNumber + branchCode + bankAccountType]
    VIZ -->|not updated ⚠️| INR_VIZ[INR_ACCOUNT\nvpa only]
    OAS -->|added| CUR[currencies.ts\nGTQ entry ✅]
Loading

Comments Outside Diff (1)

  1. components/grid-visualizer/src/data/account-types.ts, line 343-350 (link)

    P1 JMD_ACCOUNT missing bankName after regeneration

    The generated schema (bankAccountFields.generated.ts) now marks bankName as a required field for JMD_ACCOUNT, but account-types.ts was not updated to include it. This is the same GTQ drift this PR is fixing, but for JMD. The Grid Visualizer will display JMD_ACCOUNT without a bankName input, leaving users unaware it is expected by the API.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: components/grid-visualizer/src/data/account-types.ts
    Line: 343-350
    
    Comment:
    **JMD_ACCOUNT missing `bankName` after regeneration**
    
    The generated schema (`bankAccountFields.generated.ts`) now marks `bankName` as a required field for `JMD_ACCOUNT`, but `account-types.ts` was not updated to include it. This is the same GTQ drift this PR is fixing, but for JMD. The Grid Visualizer will display `JMD_ACCOUNT` without a `bankName` input, leaving users unaware it is expected by the API.
    
    
    
    How can I resolve this? If you propose a fix, please make it concise.
Prompt To Fix All With AI
Fix the following 2 code review issues. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 2
components/grid-wallet-demo/src/data/bankAccountFields.generated.ts:574-575
**INR `vpa` silently became optional**

The regeneration quietly changed `vpa` from `required: true` to `required: false` and added four new optional fields (`accountNumber`, `ifsc`, `rail`, `bankName`). None of this is mentioned in the PR description. The practical consequence is that the Grid Wallet Demo form no longer requires any field for INR payments — a user can now submit with everything blank and the validation layer won't stop them before the API call. If the OpenAPI spec genuinely changed to allow multi-rail INR (UPI or NEFT/RTGS), that intent should be documented and a cross-field "at least one of vpa or accountNumber+ifsc must be present" validation guard should be considered.

### Issue 2 of 2
components/grid-visualizer/src/data/account-types.ts:343-350
**JMD_ACCOUNT missing `bankName` after regeneration**

The generated schema (`bankAccountFields.generated.ts`) now marks `bankName` as a required field for `JMD_ACCOUNT`, but `account-types.ts` was not updated to include it. This is the same GTQ drift this PR is fixing, but for JMD. The Grid Visualizer will display `JMD_ACCOUNT` without a `bankName` input, leaving users unaware it is expected by the API.

```suggestion
  JMD_ACCOUNT: {
    accountType: 'JMD_ACCOUNT',
    fields: [
      { name: 'accountNumber', example: '1234567890' },
      { name: 'branchCode', example: '12345', description: '5-digit branch code' },
      { name: 'bankAccountType', example: 'CHECKING', description: 'CHECKING or SAVINGS' },
      { name: 'bankName', example: 'Example Bank' },
    ],
    beneficiaryRequired: true,
```

Reviews (1): Last reviewed commit: "Sync GTQ_ACCOUNT fields with OpenAPI sch..." | Re-trigger Greptile

Comment on lines 574 to +575
"key": "vpa",
"required": true,
"required": false,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 INR vpa silently became optional

The regeneration quietly changed vpa from required: true to required: false and added four new optional fields (accountNumber, ifsc, rail, bankName). None of this is mentioned in the PR description. The practical consequence is that the Grid Wallet Demo form no longer requires any field for INR payments — a user can now submit with everything blank and the validation layer won't stop them before the API call. If the OpenAPI spec genuinely changed to allow multi-rail INR (UPI or NEFT/RTGS), that intent should be documented and a cross-field "at least one of vpa or accountNumber+ifsc must be present" validation guard should be considered.

Prompt To Fix With AI
This is a comment left during a code review.
Path: components/grid-wallet-demo/src/data/bankAccountFields.generated.ts
Line: 574-575

Comment:
**INR `vpa` silently became optional**

The regeneration quietly changed `vpa` from `required: true` to `required: false` and added four new optional fields (`accountNumber`, `ifsc`, `rail`, `bankName`). None of this is mentioned in the PR description. The practical consequence is that the Grid Wallet Demo form no longer requires any field for INR payments — a user can now submit with everything blank and the validation layer won't stop them before the API call. If the OpenAPI spec genuinely changed to allow multi-rail INR (UPI or NEFT/RTGS), that intent should be documented and a cross-field "at least one of vpa or accountNumber+ifsc must be present" validation guard should be considered.

How can I resolve this? If you propose a fix, please make it concise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants