✏️ Update network dropdown labels#2784
Open
JFWooten4 wants to merge 2 commits into
Open
Conversation
Co-authored-by: Codex <noreply@openai.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the network selector dropdown in the account header to display single-word network labels (e.g., “Mainnet”, “Testnet”) while keeping the underlying stored networkName values unchanged for compatibility.
Changes:
- Added a
getNetworkDisplayName(networkName)helper to map stored network names to desired display labels. - Updated the network dropdown row rendering to show the mapped display name instead of the raw
networkName.
Comments suppressed due to low confidence (2)
extension/src/popup/components/account/AccountHeader/index.tsx:57
- This mapping updates only Main/Test. If the user enables experimental mode, Futurenet becomes the default network (
NETWORK_NAMES.FUTURENET== "Future Net") and will still display as two words. Consider also mapping "Future Net" -> "Futurenet" to keep dropdown labels consistent with docs/UI elsewhere.
switch (networkName) {
case "Main Net":
return "Mainnet";
case "Test Net":
return "Testnet";
default:
return networkName;
extension/src/popup/components/account/AccountHeader/index.tsx:277
- Changing the dropdown labels will break existing UI tests that locate these options by text (e.g. many Playwright e2e tests use
getByText("Main Net")/getByText("Test Net")inextension/e2e-tests/**). Please update those assertions/selectors to the new labels ("Mainnet"/"Testnet") or switch tests to a more stable selector than visible text.
<NetworkIcon index={i} />
<div className="AccountHeader__network-copy">
{getNetworkDisplayName(n.networkName)}
</div>
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Codex <noreply@openai.com>
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.
Right now, the network selection dropdown shows locale selection as two words, which diverges from my documentation standards and the Lab.
This only changes the display text in the account header dropdown. The underlying stored
networkNamevalues remain unchanged for compatibility with existing settings and network switching.