Skip to content

fix: updating names from enum to human readable description#270

Merged
pengying merged 1 commit intomainfrom
03-16-fix_updating_names_from_enum_to_human_readable_description
Mar 16, 2026
Merged

fix: updating names from enum to human readable description#270
pengying merged 1 commit intomainfrom
03-16-fix_updating_names_from_enum_to_human_readable_description

Conversation

@pengying
Copy link
Copy Markdown
Contributor

@pengying pengying commented Mar 16, 2026

TL;DR

Updated payment rail names from snake_case constants to human-readable display names across all currency configurations.

What changed?

Converted payment rail identifiers from technical constants to user-friendly display names:

  • FEDNOWFedNow
  • WIREWire
  • SEPA_INSTANTSEPA Instant
  • FASTER_PAYMENTSFaster Payments
  • BANK_TRANSFERBank Transfer
  • MOBILE_MONEYMobile Money
  • PAYNOWPayNow

This affects both instantRails and allRails arrays across all 22 supported currencies in the grid visualizer.

How to test?

  1. Load the grid visualizer component
  2. Verify that payment rail names display as proper human-readable text instead of technical constants
  3. Check that all currency entries show the updated rail names correctly
  4. Ensure functionality remains unchanged - only display names should be different

Why make this change?

Improves user experience by displaying payment methods with proper capitalization and spacing that users would recognize, rather than technical snake_case identifiers that are harder to read and understand.

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@pengying pengying marked this pull request as ready for review March 16, 2026 20:49
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Mar 16, 2026

Greptile Summary

Renames payment rail display strings in currencies.ts from snake_case enum constants (e.g., FEDNOW, SEPA_INSTANT, FASTER_PAYMENTS) to human-readable labels (e.g., FedNow, SEPA Instant, Faster Payments) across all 22 fiat currency entries. These values are used purely for UI display (currency picker labels, search keywords, rail badges, funding toggle tooltips). The API-facing paymentRails values in account-types.ts remain unchanged and correctly use the enum format expected by the API.

  • Acronym-only rails (RTP, ACH, SEPA, FAST, PIX, SPEI, UPI) are correctly left as-is since they are standard abbreviations
  • Multi-word rails are converted: FEDNOWFedNow, WIREWire, SEPA_INSTANTSEPA Instant, FASTER_PAYMENTSFaster Payments, BANK_TRANSFERBank Transfer, MOBILE_MONEYMobile Money, PAYNOWPayNow
  • No issues found — this is a straightforward, safe display-only change

Confidence Score: 5/5

  • This PR is safe to merge — it only changes display strings with no impact on API behavior or data flow.
  • The change is limited to renaming display-only string values in a single data file. The API-facing payment rail values in account-types.ts are correctly left unchanged. No logic, types, or control flow are modified. All consuming components use these values purely for rendering text in the UI.
  • No files require special attention.

Important Files Changed

Filename Overview
components/grid-visualizer/src/data/currencies.ts Display-only rail names updated from snake_case constants to human-readable text across all 22 currencies. API-facing rail values in account-types.ts are correctly left unchanged.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["currencies.ts\n(display strings)"] -->|instantRails, allRails| B["CurrencyPicker\n(search keywords + rail labels)"]
    A -->|instantRails| C["FundingToggle\n(JIT tooltip text)"]
    A -->|instantRails, allRails| D["InputCard\n(rail badge label)"]
    A -->|instantRails.length| E["page.tsx\n(JIT eligibility check)"]
    F["account-types.ts\n(enum strings - UNCHANGED)"] -->|paymentRails| G["code-generator.ts\n(API request body)"]
Loading

Last reviewed commit: 1a136a7

@pengying pengying merged commit 120fdd9 into main Mar 16, 2026
7 checks passed
@pengying pengying deleted the 03-16-fix_updating_names_from_enum_to_human_readable_description branch March 16, 2026 20:53
patcapulong added a commit that referenced this pull request Mar 16, 2026
Major design and UX overhaul of the Grid Visualizer (flow builder). Redesigned input cards, funding model section, and keyboard navigation. Incorporates PR #241 (new currencies/account types) and PR #270 (human-readable rail names). Fixes: SWAP funding mode bug, RailDropdown state drift, JIT eligibility guard, flow diagram rail labels, missing DKK/RWF flags and region labels.
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.

2 participants