Skip to content
Merged
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
1 change: 1 addition & 0 deletions components/grid-visualizer/src/data/account-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@ export const accountTypeSpecs: Record<string, AccountTypeSpec> = {
{ name: 'accountNumber', example: '1234567890123456' },
{ name: 'phoneNumber', example: '+923001234567' },
{ name: 'iban', example: 'PK36SCBL0000001123456702', description: 'Optional' },
{ name: 'bankName', example: 'HBL', description: 'Required for Mobile Money' },
],
beneficiaryRequired: true,
},
Expand Down
1 change: 1 addition & 0 deletions components/grid-visualizer/src/lib/code-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ function buildAccountInfoBody(sel: CurrencySelection): Record<string, unknown> {
fullName: sel.examplePerson.fullName,
birthDate: '1985-06-20',
nationality: sel.examplePerson.nationality,
countryOfResidence: sel.examplePerson.nationality,
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.

P2 countryOfResidence reuses nationality value

nationality (country of citizenship) and countryOfResidence (country of current habitation) are distinct fields in the schema. Conflating them in the generated example may mislead developers who copy the snippet and assume the same value should be passed for both. Consider either adding a dedicated countryOfResidence field to ExamplePerson, or using a static placeholder that makes the distinction clear (e.g., 'US' as a generic residency example separate from the nationality value).

Prompt To Fix With AI
This is a comment left during a code review.
Path: components/grid-visualizer/src/lib/code-generator.ts
Line: 58

Comment:
**`countryOfResidence` reuses `nationality` value**

`nationality` (country of citizenship) and `countryOfResidence` (country of current habitation) are distinct fields in the schema. Conflating them in the generated example may mislead developers who copy the snippet and assume the same value should be passed for both. Consider either adding a dedicated `countryOfResidence` field to `ExamplePerson`, or using a static placeholder that makes the distinction clear (e.g., `'US'` as a generic residency example separate from the nationality value).

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

Fix in Claude Code

};
}

Expand Down
Loading