Skip to content

fix: default wallet button components to mainnet chainscan#259

Closed
yqrashawn wants to merge 4 commits into0gfoundation:mainfrom
yqrashawn:fix/wallet-buttons-mainnet-default
Closed

fix: default wallet button components to mainnet chainscan#259
yqrashawn wants to merge 4 commits into0gfoundation:mainfrom
yqrashawn:fix/wallet-buttons-mainnet-default

Conversation

@yqrashawn
Copy link

Summary

  • Changed default props in OKXButton and MetaMaskButton components from Galileo testnet (chain ID 16602, chainscan-galileo.0g.ai) to mainnet (chain ID 16661, chainscan.0g.ai)
  • Updated testnet-overview.md to explicitly pass testnet chain params to wallet buttons, since those buttons now default to mainnet

Context

This is part of a broader SEO initiative to ensure chainscan.0g.ai (mainnet) ranks above testnet URLs in search results. Having the components default to testnet caused any doc page that embedded wallet buttons without explicit props to silently reference the testnet block explorer.

Related: 0g-chain-scan-website #11 (parent chainscan SEO fix)
Slack thread: https://0g-labs.slack.com/archives/C0ADTBNJH7F/p1773723361528969

Changes

File Change
src/components/OKXButton/index.tsx Default chainId → 16661, chainName"0G Mainnet", rpcUrlsevmrpc.0g.ai, blockExplorerUrlschainscan.0g.ai/
src/components/MetaMaskButton/index.tsx Same defaults updated to mainnet
docs/developer-hub/testnet/testnet-overview.md Wallet buttons now explicitly pass all Galileo testnet props so they continue to add the correct testnet network

No Breakage

  • mainnet-overview.md already explicitly passes all mainnet props — no change needed there
  • testnet-overview.md previously relied on defaults (which happened to be testnet) — now passes explicit testnet props, same behavior preserved

@vercel
Copy link

vercel bot commented Mar 17, 2026

@yqrashawn is attempting to deploy a commit to the 0g-Frontend Team on Vercel.

A member of the Team first needs to authorize it.

@yqrashawn
Copy link
Author

Closing this PR — the component default change was unnecessary and caused issues.

Analysis: All references in are already in correct testnet contexts:

  • → testnet chainscan ✓
  • → both testnet and mainnet sections correctly labeled ✓
  • → testnet config section ✓

No mainnet doc page incorrectly links to testnet chainscan, so there's nothing to fix here for SEO.

Bug introduced: Changing defaults to mainnet also removed the state and trigger — breaking the Newton→Galileo migration flow for testnet users.

The SEO fix is already covered by:

  • — per-environment titles, meta descriptions, canonical tags, and robots meta
  • — storagescan internal link fixed

@yqrashawn yqrashawn closed this Mar 17, 2026
@yqrashawn yqrashawn deleted the fix/wallet-buttons-mainnet-default branch March 17, 2026 08:23
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.

1 participant