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
17 changes: 14 additions & 3 deletions components/grid-visualizer/src/data/account-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,16 +299,16 @@ export const accountTypeSpecs: Record<string, AccountTypeSpec> = {
accountType: 'COP_ACCOUNT',
fields: [
{ name: 'accountNumber', example: '1234567890', description: 'For bank transfer' },
{ name: 'bankAccountType', example: 'CHECKING', description: 'CHECKING or SAVINGS (for bank transfer)' },
{ name: 'phoneNumber', example: '+573001234567', description: 'For mobile money' },
],
beneficiaryRequired: true,
},
EGP_ACCOUNT: {
accountType: 'EGP_ACCOUNT',
fields: [
{ name: 'accountNumber', example: '1234567890123456' },
{ name: 'iban', example: 'EG380019000500000000263180002', description: 'Optional' },
{ name: 'swiftCode', example: 'NBEGEGCX', description: 'Optional' },
{ name: 'iban', example: 'EG380019000500000000263180002', description: 'For bank transfer' },
{ name: 'phoneNumber', example: '+201234567890', description: 'For mobile money' },
],
beneficiaryRequired: true,
},
Expand Down Expand Up @@ -364,4 +364,15 @@ export const accountTypeSpecs: Record<string, AccountTypeSpec> = {
],
beneficiaryRequired: true,
},
SWIFT_ACCOUNT: {
accountType: 'SWIFT_ACCOUNT',
fields: [
{ name: 'swiftCode', example: 'DEUTDEFF', description: 'SWIFT/BIC code (8-11 characters)' },
{ name: 'bankName', example: 'Deutsche Bank' },
{ name: 'country', example: 'NG', description: 'ISO 3166-1 alpha-2 country code' },
{ name: 'accountNumber', example: '1234567890', description: 'For most corridors' },
{ name: 'iban', example: 'GB29NWBK60161331926819', description: 'For IBAN-only corridors (e.g. BR, GB)' },
],
beneficiaryRequired: true,
},
Comment on lines +367 to +377
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 SWIFT_ACCOUNT unreachable in the visualizer

SWIFT_ACCOUNT is defined here but no entry in currencies.ts sets accountType: 'SWIFT_ACCOUNT', so the CurrencyPicker will never expose it and code-generator.ts will never look it up. The spec is effectively dead code in the visualizer until a currency (or a separate UI path) references it.

Prompt To Fix With AI
This is a comment left during a code review.
Path: components/grid-visualizer/src/data/account-types.ts
Line: 367-377

Comment:
**SWIFT_ACCOUNT unreachable in the visualizer**

`SWIFT_ACCOUNT` is defined here but no entry in `currencies.ts` sets `accountType: 'SWIFT_ACCOUNT'`, so the `CurrencyPicker` will never expose it and `code-generator.ts` will never look it up. The spec is effectively dead code in the visualizer until a currency (or a separate UI path) references it.

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

Fix in Claude Code

};
20 changes: 20 additions & 0 deletions components/grid-visualizer/src/data/currencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,26 @@ export const currencies: FiatCurrency[] = [
allRails: ['Bank Transfer'],
examplePerson: { fullName: 'Chioma Okafor', nationality: 'NG' },
},
{
code: 'COP',
name: 'Colombian Peso',
countryCode: 'co',
accountType: 'COP_ACCOUNT',
accountLabel: 'Colombian Bank/Mobile',
instantRails: [],
allRails: ['Bank Transfer', 'Mobile Money'],
examplePerson: { fullName: 'Carlos Rodríguez', nationality: 'CO' },
},
{
code: 'EGP',
name: 'Egyptian Pound',
countryCode: 'eg',
accountType: 'EGP_ACCOUNT',
accountLabel: 'Egyptian Bank/Mobile',
instantRails: [],
allRails: ['Bank Transfer', 'Mobile Money'],
examplePerson: { fullName: 'Ahmed Hassan', nationality: 'EG' },
},
{
code: 'CAD',
name: 'Canadian Dollar',
Expand Down
Loading