Skip to content

Offer Ethereum as a USDC network, per the schema - #792

Merged
shreyav merged 1 commit into
mainfrom
claude/crypto-ethereum-usdc
Aug 4, 2026
Merged

Offer Ethereum as a USDC network, per the schema#792
shreyav merged 1 commit into
mainfrom
claude/crypto-ethereum-usdc

Conversation

@shreyav

@shreyav shreyav commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Summary

PaymentEthereumWalletInfo.yaml declares enum: [USDC, USDT], but crypto.ts listed ETHEREUM_WALLET only under USDT. USDC-on-Ethereum is supported by the API and simply could not be selected in the visualizer, so that flow could not be built or code-generated.

One line. Ethereum is the only chain carrying both assets — Base and Polygon are USDC-only per their own Payment<Chain>WalletInfo.yaml enums — so this is the single missing entry, not the first of a batch.

Chain Schema enum In crypto.ts before
Ethereum USDC, USDT USDT only ❌
Base USDC USDC ✅
Polygon USDC USDC ✅

⚠️ Missing network icon — please read

NetworkDropdown renders /networks/${network.toLowerCase()}.svg with no error handling, and public/networks/ethereum.svg does not exist. The new row will render without an icon.

This gap is pre-existing, not introduced here — tron.svg and plasma.svg are missing too, so USDT's dropdown already shows three iconless rows. But USDC's dropdown currently has all three of its icons (solana, polygon, base), so this change does put the first broken one there.

I did not add the asset: an Ethereum mark is brand artwork, and inventing one that doesn't match the existing set is worse than leaving the gap visible. Someone should drop in ethereum.svg — and tron.svg / plasma.svg while they're at it, since those are already broken today.

If the missing icon is a blocker, holding this until the asset lands is reasonable. The data being wrong is the more serious problem, so I'd merge and follow up.

Verification

  • Strict typecheck of crypto.ts — clean
  • Cross-checked all three EVM chains against their Payment<Chain>WalletInfo.yaml enums, not just Ethereum
  • Not verified: no build or render check — npm ci fails here because @central-icons-react requires CENTRAL_LICENSE_KEY. The Vercel preview is the real check; worth confirming the USDC dropdown now offers Ethereum and seeing how the iconless row actually looks.

Context

Found while triaging the stale docs-sync PRs. This is the one genuinely-unlanded, non-documentation item from #288, whose other changes are already on main (ETHEREUM_WALLET in account-types.ts, the businessType: FINTECHFINANCE_AND_INSURANCE fix) or superseded (currency entries via #791, the supported-chain table via #777).


Generated by Claude Code

PaymentEthereumWalletInfo.yaml declares enum [USDC, USDT], but crypto.ts
listed ETHEREUM_WALLET only under USDT. USDC-on-Ethereum is supported by
the API and could not be selected or code-generated in the visualizer.

Base and Polygon are USDC-only and Ethereum is the one chain carrying
both assets, so this is the only entry that was missing.

Note public/networks/ has no ethereum.svg, so the new dropdown row
renders without an icon. That gap is pre-existing rather than introduced
here - tron.svg and plasma.svg are missing too, so USDT's dropdown
already has three iconless rows - but this does add a fourth, on a
dropdown that was previously clean. Needs a brand asset, not a
fabricated one.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MMnjJ8yWJsui7jLqqrDrL4
@vercel

vercel Bot commented Aug 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
grid-flow-builder Ready Ready Preview Aug 4, 2026 4:30am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
grid-wallet-demo Ignored Ignored Aug 4, 2026 4:30am

Request Review

@greptile-apps

greptile-apps Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR exposes Ethereum as a supported USDC wallet network in the flow-builder visualizer, aligning its static options with the existing API schema and account-type metadata.

  • Adds ETHEREUM_WALLET to the USDC payment-rail options.
  • Reuses the visualizer’s existing generic selection and code-generation paths.

Confidence Score: 5/5

The PR appears safe to merge, with the known missing Ethereum icon already acknowledged for follow-up.

The new USDC network option matches the Ethereum wallet schema and existing account-type metadata, and the visualizer handles it through established generic selection and code-generation paths.

Important Files Changed

Filename Overview
components/grid-visualizer/src/data/crypto.ts Adds the schema-supported Ethereum wallet option to USDC; existing metadata and generic generation logic already support this pairing.

Reviews (1): Last reviewed commit: "Offer Ethereum as a USDC network, per th..." | Re-trigger Greptile

@shreyav
shreyav merged commit 54dc41c into main Aug 4, 2026
9 checks passed
@shreyav
shreyav deleted the claude/crypto-ethereum-usdc branch August 4, 2026 05:58
shreyav added a commit that referenced this pull request Aug 4, 2026
## Summary

`RailDropdown` renders `/networks/${network.toLowerCase()}.svg` for
every entry with no error handling, and **three of the eight networks in
`crypto.ts` have no asset**: `ethereum`, `plasma`, `tron`. Those rows
show a broken image next to the network name.

Three lines: an `onError` that hides the image.

```
networks referenced:  base ethereum lightning plasma polygon solana spark tron
icons present:        base bitcoin lightning polygon solana spark
missing:              ethereum plasma tron
```

USDT has carried three broken rows for a while. #792 added Ethereum to
USDC, which put the first one on a dropdown that had been clean — that's
what surfaced it.

**Why hide rather than supply the artwork.** An Ethereum or Tron mark is
brand material, and inventing one that doesn't match the existing set is
worse than a gap. The three assets are still worth adding; this just
stops the UI looking broken until they are.

**Why `visibility` rather than `display`.** `.networkMenuIcon` is a
fixed 20×20 flex item, so hiding it preserves the slot and the network
names stay left-aligned down the list. `display: none` would make rows
ragged depending on which icons happen to exist.

## What I did not include, and why

This branch was going to carry the **duplicate `code: 'USD'`** fix as
well — `currencies.ts` has two entries with that code (United States
Dollar, and US Dollar (El Salvador)), so `currencies.find(c => c.code
=== 'USD')` never reaches the El Salvador entry and the picker builds
two items with the same `id`, making it effectively unselectable.

Mapping it out, that is **not a small fix**. It needs selections
re-keyed from `code` to `accountType` across roughly ten lookup sites in
five files — `CurrencyPicker.lookupSelection`, `getRailsText`, three
lookups in `InputCard`, three in `useFlowBuilder` including
`getDefaultRail`'s signature, `code-generator`, `flow-path` — plus
`POPULAR_CODES`, which matches item ids. `isSameCurrency` also needs a
decision, since two USD entries are the same currency on different
rails.

All of that lands in `.tsx` files I **cannot typecheck in this
environment** — `npm ci` fails in `components/grid-visualizer` because
`@central-icons-react` requires `CENTRAL_LICENSE_KEY`, so React types
are unavailable. Shipping a ten-site refactor unverified seemed like the
wrong trade, so it wants its own PR from someone with a working build.

## Verification

- Missing-icon list derived mechanically by diffing `public/networks/`
against the `network` values in `crypto.ts`
- `.networkMenuIcon` confirmed to have fixed dimensions, so `visibility:
hidden` is layout-stable
- **Not verified:** no build or render check, for the reason above. The
Vercel preview is the real check — worth opening the USDC and USDT rail
dropdowns to confirm the rows align with the icons absent.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01MMnjJ8yWJsui7jLqqrDrL4)_

Co-authored-by: Claude <noreply@anthropic.com>
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.

3 participants