Sync GTQ_ACCOUNT with OpenAPI schema#674
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryThis PR syncs GTQ (Guatemalan Quetzal) account field definitions across the Grid Visualizer and Grid Wallet Demo with the OpenAPI schema, replacing the incorrect
Confidence Score: 3/5Needs 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).
|
| 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 ✅]
%%{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 ✅]
Comments Outside Diff (1)
-
components/grid-visualizer/src/data/account-types.ts, line 343-350 (link)JMD_ACCOUNT missing
bankNameafter regenerationThe generated schema (
bankAccountFields.generated.ts) now marksbankNameas a required field forJMD_ACCOUNT, butaccount-types.tswas not updated to include it. This is the same GTQ drift this PR is fixing, but for JMD. The Grid Visualizer will displayJMD_ACCOUNTwithout abankNameinput, 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
| "key": "vpa", | ||
| "required": true, | ||
| "required": false, |
There was a problem hiding this 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.
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.
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_ACCOUNTfield specs to match OpenAPI schema. Replaced incorrectphoneNumberfield with the requiredbankAccountType(CHECKING/SAVINGS) andbankNamefields.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
bankNamefield that was added in commit 95ded8a.These changes ensure the UI components correctly reflect the GTQ account requirements defined in
GtqAccountInfoBase.yaml.Test plan
npm run verify:bank-fieldsin grid-wallet-demo to confirm schema sync🤖 Generated with Claude Code