Skip to content

feat: add 0G network icon and native-asset icon - #34205

Merged
maxime-oe merged 4 commits into
mainfrom
feat/add-0g-support-p3_3
Aug 13, 2026
Merged

feat: add 0G network icon and native-asset icon#34205
maxime-oe merged 4 commits into
mainfrom
feat/add-0g-support-p3_3

Conversation

@maxime-oe

@maxime-oe maxime-oe commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Wires 0G (16661/0x4115) into NETWORK_CHAIN_ID and
CustomNetworkImgMapping (network-picker icon) -- not the PopularList additional-network entry, which stays out of scope per the standing additional-network-is-optional ruling (same treatment as Somnia).

Also wires app/images/image-icons.js's imageIcons map, keyed by ticker symbol ('0G'), since the native-asset row in the wallet's asset list resolves its icon via NetworkAssetLogo -> Base/TokenIcon through that map, not through CustomNetworkImgMapping.

Description

Changelog

CHANGELOG entry: add 0G network icon and native-asset icon

Related issues

Fixes:

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

Screenshots/Recordings

Before

After

image image

Pre-merge author checklist

Performance checks (if applicable)

  • I've tested on Android
    • Ideally on a mid-range device; emulator is acceptable
  • I've tested with a power user scenario
    • Use these power-user SRPs to import wallets with many accounts and tokens
  • I've instrumented key operations with Sentry traces for production performance metrics

For performance guidelines and tooling, see the Performance Guide.

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Note

Low Risk
Display-only asset and mapping additions with no RPC, auth, or transaction logic changes.

Overview
Adds 0G (chain 0x4115 / 16661) to the custom-network icon plumbing so the network picker and wallet UI can show branded artwork when users are on that chain.

NETWORK_CHAIN_ID gains ZERO_G, and CustomNetworkImgMapping points it at 0g-mainnet-logo.png. Separately, image-icons.js maps the native ticker '0G' to 0g-native-logo.png so the asset list resolves the native token logo via NetworkAssetLogo / TokenIcon, not the chain-id mapping.

PopularList is unchanged (same optional treatment as Somnia).

Reviewed by Cursor Bugbot for commit 10a2368. Bugbot is set up for automated code reviews on this repo. Configure here.

Wires 0G (16661/0x4115) into NETWORK_CHAIN_ID and
CustomNetworkImgMapping (network-picker icon) -- not the PopularList
additional-network entry, which stays out of scope per the standing
additional-network-is-optional ruling (same treatment as Somnia).

Also wires app/images/image-icons.js's imageIcons map, keyed by
ticker symbol ('0G'), since the native-asset row in the wallet's
asset list resolves its icon via NetworkAssetLogo -> Base/TokenIcon
through that map, not through CustomNetworkImgMapping.

Core package bump (@metamask/assets-controllers) deferred to a
follow-up commit once MetaMask/core#9760 merges and publishes.
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

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.

@metamask-ci metamask-ci Bot added the team-networks Networks team label Aug 3, 2026
@github-actions github-actions Bot added the pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. label Aug 3, 2026
@metamask-ci

metamask-ci Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

PR template — items to address before "Ready for review"

Warnings — informational, address before merging:

  • Description section is empty. Describe what changed and why.
  • Related issues section is empty. Add Fixes: #123 / Closes: <URL> / Refs: <Jira key>, or write a short rationale after the colon.
  • Manual testing steps still contain template content (the Gherkin example title or a [...] placeholder). Replace with real steps, or write N/A — <reason>.
  • Pre-merge author checklist has unchecked items (e.g. "I've followed MetaMask Contributor Docs and MetaMask Mobile Coding Standards."). Every box must be consciously checked — see docs/readme/ready-for-review.md.

See docs/readme/ready-for-review.md for the full Definition of Ready for Review.

The previous commit imported app/images/0g-mainnet-logo.png (the
purple-background network logo) as ZERO_G_NATIVE for image-icons.js's
native-asset row, reasoning "no separate native-token asset" -- that
was wrong. chain-input.yaml tracks two distinct assets:
branding.networkLogoSvgPath (purple background, white mark -- the
network icon, correctly used by CustomNetworkImgMapping) 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-logo.png (from the enablement's own
branding/native/0g.png) and repoints image-icons.js's '0G' entry at
it. CustomNetworkImgMapping.ZERO_G (the network-picker icon) is
unaffected and stays on the purple network logo.
# Conflicts:
#	app/images/image-icons.js
#	app/util/networks/customNetworks.tsx
@maxime-oe
maxime-oe marked this pull request as ready for review August 6, 2026 11:24
@github-actions github-actions Bot added the risk:low AI analysis: low risk label Aug 6, 2026
@maxime-oe maxime-oe removed the pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. label Aug 6, 2026
@maxime-oe
maxime-oe added this pull request to the merge queue Aug 6, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 6, 2026
@maxime-oe
maxime-oe added this pull request to the merge queue Aug 13, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 13, 2026
@maxime-oe
maxime-oe added this pull request to the merge queue Aug 13, 2026
@maxime-oe
maxime-oe removed this pull request from the merge queue due to a manual request Aug 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeNetworkAbstractions
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: low
  • AI Confidence: 90%
click to see 🤖 AI reasoning details

E2E Test Selection:
The PR adds support for the 0G Mainnet network (chain ID 0x4115) by:

  1. Adding two new PNG image assets (mainnet logo and native token logo)
  2. Registering the native token icon in image-icons.js
  3. Adding ZERO_G chain ID to NETWORK_CHAIN_ID constant and mapping it to the logo in CustomNetworkImgMapping in customNetworks.tsx

These are purely additive, non-breaking changes. No controller logic, transaction flows, Engine, or critical paths are modified. The changes affect the network management layer (adding a new custom network entry) and asset display (network badge/token icon). SmokeNetworkAbstractions covers network management UI including adding networks and viewing available networks, which is the most relevant test suite for validating this change. No dependent tags are required since this doesn't touch dApp chain permissions, multi-chain sessions, or transaction confirmations.

Performance Test Selection:
The changes are purely additive — new image assets and a new chain ID entry in a static mapping. There is no impact on app launch time, account list rendering, login performance, swap flows, or any other performance-sensitive path. No performance tests are warranted.

View GitHub Actions results

@sonarqubecloud

Copy link
Copy Markdown

@maxime-oe
maxime-oe added this pull request to the merge queue Aug 13, 2026
Merged via the queue into main with commit 82863bf Aug 13, 2026
90 of 92 checks passed
@maxime-oe
maxime-oe deleted the feat/add-0g-support-p3_3 branch August 13, 2026 09:31
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 13, 2026
@metamask-ci metamask-ci Bot added the release-8.8.0 Issue or pull request that will be included in release 8.8.0 label Aug 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-8.8.0 Issue or pull request that will be included in release 8.8.0 risk:low AI analysis: low risk size-XS team-networks Networks team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants