feat: add 0G network icon and currency symbol - #45153
Conversation
Wires 0G (16661/0x4115) into the general chain-ID lookup maps (NETWORK_TO_NAME_MAP, CHAIN_ID_TO_CURRENCY_SYMBOL_MAP, CHAIN_ID_TO_NETWORK_IMAGE_URL_MAP, CHAIN_ID_TOKEN_IMAGE_MAP) -- not the FEATURED_RPCS/additional-network picker list, which stays out of scope per the standing additional-network-is-optional ruling (same treatment as Somnia). Native currency 0G reuses the network icon (no separate native-token asset), copied from this enablement's official branding assets. Core package bump (@metamask/assets-controllers) deferred to a follow-up commit once MetaMask/core#9760 merges and publishes.
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
The previous commit pointed CHAIN_ID_TOKEN_IMAGE_MAP.ZERO_G at ZERO_G_IMAGE_URL (the purple-background network logo), reasoning "0G has no separate native-token asset" -- that was wrong. chain-input.yaml tracks two distinct assets: branding.networkLogoSvgPath (purple background, white mark -- the network icon) and nativeToken.logoSvgPath (white background, purple mark -- the native-token icon). Same brand mark, inverted colors, genuinely different files (confirmed via checksum, not just visual inspection). Adds app/images/0g-native.svg (from the enablement's own branding/native/0g.svg) and ZERO_G_NATIVE_TOKEN_IMAGE_URL, and repoints CHAIN_ID_TOKEN_IMAGE_MAP.ZERO_G at it. CHAIN_ID_TO_NETWORK_IMAGE_URL_MAP.ZERO_G (the network map) is unaffected and stays on the purple network logo.
Builds ready [ec03936]
⚡ Performance Benchmarks (Total: 🟢 13 pass · 🟡 10 warn · 🔴 1 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
# Conflicts: # shared/constants/network.ts
|
Builds ready [75f6253]
⚡ Performance Benchmarks (Total: 🟢 11 pass · 🟡 12 warn · 🔴 1 fail)
Bundle size diffs
|



Wires 0G (16661/0x4115) into the general chain-ID lookup maps (NETWORK_TO_NAME_MAP, CHAIN_ID_TO_CURRENCY_SYMBOL_MAP, CHAIN_ID_TO_NETWORK_IMAGE_URL_MAP, CHAIN_ID_TOKEN_IMAGE_MAP) -- not the FEATURED_RPCS/additional-network picker list, which stays out of scope per the standing additional-network-is-optional ruling (same treatment as Somnia).
Native currency 0G reuses the network icon (no separate native-token asset), copied from this enablement's official branding assets.
Description
Changelog
CHANGELOG entry: add 0G network icon and currency symbol- #45153
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
Static constants and image assets only; no RPC, auth, or transaction logic changes.
Overview
Adds 0G (16661 /
0x4115) to the extension’s shared network metadata so the UI can show the correct name, ticker, and artwork when that chain is in use (e.g. custom or dapp-added networks).New branding SVGs (
0g.svg,0g-native.svg) and constants wire 0G intoCHAIN_IDS, display name 0G, native currency0G, and the usual maps:NETWORK_TO_NAME_MAP,CHAIN_ID_TO_CURRENCY_SYMBOL_MAP,CHAIN_ID_TO_NETWORK_IMAGE_URL_MAP, andCHAIN_ID_TOKEN_IMAGE_MAP.Out of scope: no entry in
FEATURED_RPCS/ the additional-network picker (same pattern as Somnia).Reviewed by Cursor Bugbot for commit 75f6253. Bugbot is set up for automated code reviews on this repo. Configure here.