Skip to content

fix(settings): hide Network-mode row from production builds#636

Closed
TaprootFreak wants to merge 1 commit into
stagingfrom
fix/settings-hide-network-row
Closed

fix(settings): hide Network-mode row from production builds#636
TaprootFreak wants to merge 1 commit into
stagingfrom
fix/settings-hide-network-row

Conversation

@TaprootFreak
Copy link
Copy Markdown
Contributor

Summary

Hides the Settings → Network row (Mainnet/Testnet toggle) from production builds.

The toggle is a developer affordance — an end-user has no legitimate reason to switch networks, and an accidental tap drops them onto Testnet with broken liquidity and a forced reauth on every subsequent network round-trip.

Change

Wraps the SettingOption that opens SettingsNetworkPage in a if (kDebugMode) collection-if. This mirrors the existing pattern in lib/screens/welcome/welcome_page.dart:125, where the Address + Signature debug entry is hidden the same way.

What stays:

  • SettingsNetworkPage, SettingsRoutes.network, SettingsBloc network-mode state, SettingsRepository.networkMode — all untouched.
  • Default Mainnet mode stays active for every user.
  • Debug builds still expose the toggle for internal use.

Test plan

  • flutter analyze clean on the touched file.
  • Production build of the Settings page no longer lists the Network row.
  • Debug build still shows it.
  • Visual Regression: the settings_page golden will drift; regenerate via golden-regenerate.yaml after merge to refresh the handbook screenshot (§12-settings).

The Mainnet/Testnet toggle in Settings is a developer affordance — there
is no end-user reason to switch networks and an accidental tap drops the
user onto Testnet with broken liquidity and a forced reauth on every
subsequent network round-trip.

Wraps the SettingOption that opens `SettingsNetworkPage` in a
`if (kDebugMode)` collection-if, mirroring the existing pattern in
`lib/screens/welcome/welcome_page.dart:125` for the Address+Signature
debug entry. `SettingsNetworkPage`, `SettingsRoutes.network`,
`SettingsBloc` network-mode state, and `SettingsRepository.networkMode`
all stay — debug builds still expose the toggle, the default Mainnet
mode stays active for everyone, and an internal dev can flip via a
debug build when needed.
@TaprootFreak
Copy link
Copy Markdown
Contributor Author

Folded into #635 — consolidated handbook §02/§03/§12 update into one PR.

@TaprootFreak TaprootFreak deleted the fix/settings-hide-network-row branch June 2, 2026 00:19
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