Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion components/grid-visualizer/src/data/account-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,8 @@ export const accountTypeSpecs: Record<string, AccountTypeSpec> = {
accountType: 'GTQ_ACCOUNT',
fields: [
{ name: 'accountNumber', example: '1234567890' },
{ name: 'phoneNumber', example: '+50212345678' },
{ name: 'bankAccountType', example: 'CHECKING', description: 'CHECKING or SAVINGS' },
{ name: 'bankName', example: 'Example Bank' },
],
beneficiaryRequired: true,
},
Expand Down
10 changes: 10 additions & 0 deletions components/grid-visualizer/src/data/currencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,4 +275,14 @@ export const currencies: FiatCurrency[] = [
allRails: ['Bank Transfer', 'Mobile Money'],
examplePerson: { fullName: 'Wei Zhang', nationality: 'CN' },
},
{
code: 'GTQ',
name: 'Guatemalan Quetzal',
countryCode: 'gt',
accountType: 'GTQ_ACCOUNT',
accountLabel: 'Guatemalan Bank Account',
instantRails: [],
allRails: ['Bank Transfer'],
examplePerson: { fullName: 'Carlos López', nationality: 'GT' },
},
];
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,15 @@ export const BANK_ACCOUNT_SCHEMAS: Record<string, BankAccountSchema> = {
],
"description": "The bank account type",
"example": "CHECKING"
},
{
"key": "bankName",
"required": true,
"kind": "text",
"minLength": 1,
"maxLength": 255,
"description": "The name of the beneficiary's bank",
"example": "Example Bank"
}
]
},
Expand Down Expand Up @@ -563,13 +572,51 @@ export const BANK_ACCOUNT_SCHEMAS: Record<string, BankAccountSchema> = {
"fields": [
{
"key": "vpa",
"required": true,
"required": false,
Comment on lines 574 to +575

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.

"kind": "text",
"pattern": "^[a-zA-Z0-9.\\-_]+@[a-zA-Z0-9]+$",
"minLength": 3,
"maxLength": 255,
"description": "The UPI Virtual Payment Address",
"example": "user@upi"
},
{
"key": "accountNumber",
"required": false,
"kind": "text",
"pattern": "^[0-9]{9,18}$",
"minLength": 9,
"maxLength": 18,
"description": "Indian bank account number (9–18 digits)",
"example": "000111222333"
},
{
"key": "ifsc",
"required": false,
"kind": "text",
"pattern": "^[A-Z]{4}0[A-Z0-9]{6}$",
"minLength": 11,
"maxLength": 11,
"description": "The Indian Financial System Code (IFSC) of the beneficiary's bank branch (NEFT/RTGS)",
"example": "HDFC0001234"
},
{
"key": "rail",
"required": false,
"kind": "text",
"minLength": 1,
"maxLength": 32,
"description": "The payment rail to route the payout over, for currencies that support more than one (e.g. NEFT or RTGS for INR).",
"example": "NEFT"
},
{
"key": "bankName",
"required": false,
"kind": "text",
"minLength": 1,
"maxLength": 255,
"description": "The name of the bank",
"example": "Example Bank"
}
]
},
Expand Down Expand Up @@ -606,6 +653,15 @@ export const BANK_ACCOUNT_SCHEMAS: Record<string, BankAccountSchema> = {
],
"description": "The bank account type",
"example": "CHECKING"
},
{
"key": "bankName",
"required": true,
"kind": "text",
"minLength": 1,
"maxLength": 255,
"description": "The name of the bank",
"example": "Example Bank"
}
]
},
Expand Down
Loading