fix: default wallet button components to mainnet chainscan#259
Closed
yqrashawn wants to merge 4 commits into0gfoundation:mainfrom
Closed
fix: default wallet button components to mainnet chainscan#259yqrashawn wants to merge 4 commits into0gfoundation:mainfrom
yqrashawn wants to merge 4 commits into0gfoundation:mainfrom
Conversation
|
@yqrashawn is attempting to deploy a commit to the 0g-Frontend Team on Vercel. A member of the Team first needs to authorize it. |
Author
|
Closing this PR — the component default change was unnecessary and caused issues. Analysis: All references in are already in correct testnet contexts:
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:
|
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
OKXButtonandMetaMaskButtoncomponents from Galileo testnet (chain ID 16602,chainscan-galileo.0g.ai) to mainnet (chain ID 16661,chainscan.0g.ai)testnet-overview.mdto explicitly pass testnet chain params to wallet buttons, since those buttons now default to mainnetContext
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
src/components/OKXButton/index.tsxchainId→ 16661,chainName→"0G Mainnet",rpcUrls→evmrpc.0g.ai,blockExplorerUrls→chainscan.0g.ai/src/components/MetaMaskButton/index.tsxdocs/developer-hub/testnet/testnet-overview.mdNo Breakage
mainnet-overview.mdalready explicitly passes all mainnet props — no change needed theretestnet-overview.mdpreviously relied on defaults (which happened to be testnet) — now passes explicit testnet props, same behavior preserved