feat: add Base network (8453) + refactor network visual system#79
Open
ignromanov wants to merge 27 commits intodevelopfrom
Open
feat: add Base network (8453) + refactor network visual system#79ignromanov wants to merge 27 commits intodevelopfrom
ignromanov wants to merge 27 commits intodevelopfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Visual config Records (NETWORK_SHADOWS, NETWORK_GLOWS, NETWORK_GLOW_SHADOWS, NETWORK_GLOW_BORDERS, NETWORK_BADGES) were keyed by mainnet chain IDs only, causing missing glow on testnet invoices (e.g. Base Sepolia 84532). Added withTestnets() helper that auto-derives testnet entries from TESTNET_PARENT, so new networks only need one mapping update.
…s, lowercase addresses
… NetworkIcon a11y - NetworkTheme now aliases NetworkThemeName from network-palette (canonical source) - isValidNetworkTheme validates against NETWORK_PALETTE instead of NETWORK_THEMES - Remove 10 dead NEXT_PUBLIC_ALCHEMY/INFURA_*_URL env vars (RPC proxy uses API keys + slug maps) - NetworkIcon resolves testnet chain IDs to mainnet for icon/color/letter lookup - Add aria-label to both branded and fallback NetworkIcon paths - Export NETWORK_PALETTE and NetworkThemeName from shared/ui public API
… tokens Add 5th demo invoice for Base network (USDC, pending status) to landing page carousel. Fix react-hook-form reset() not clearing tokenAddress when loading native token templates (ETH/POL) — undefined must be mapped to '' so RHF treats it as an explicit value rather than "keep current".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
What Changed
Base Network Support
NetworkBasecomponentNetwork Visual System Refactor
network-palette.ts(NEW) — single source of truth for all network hex colorstestnet-utils.ts(NEW) —TESTNET_PARENT,withTestnets(),resolveMainnetId()— testnet configs derived automaticallynetwork-themes.tssimplified — 10 manual entries → 5 mainnet +withTestnets()derivation (-82 lines)getNetworkThemeName(theme key) vsgetNetworkName(display name)NEXT_PUBLIC_ALCHEMY/INFURA_*_URLfrom env schema +.env.examplearia-labelaccentColorshoisted to module scope (no re-creation per render)sky-*vs Baseblue-*(visually distinct)Adding a New Network (post-refactor)
NETWORK_PALETTE(network-palette.ts)chains.ts+ testnet mapping intestnet-utils.tswithTestnets()Details
chain-dict.tshas8453 → 0x05Test plan
pnpm type-check:build— 0 errorspnpm lint— no issuespnpm test— 188 files, 2623 tests passed, 0 failedCloses #31