Add devnet/mainnet network switcher (combo app)#39
Open
abhay wants to merge 1 commit into
Open
Conversation
Ship one app that carries both the devnet and mainnet relay configs with a runtime switcher, replacing the separate devnet bundle. - Network model: a first-class Network enum (Core) is the source of truth; NetworkConfig derives the relay, Explorer, websocket, and airdrop support per network. Both relay URLs are baked into the app Info.plist. - Reactive swap: NetworkSettingsStore owns the selected network and derives the IndexerEnvironment from it. Switching rebuilds SquadsService (a fresh instance flushes the squad, proposal, and activity caches) and realigns the relay URL. Signers are network-agnostic and persist across a switch. - Migration: fresh installs default to mainnet; installs that already have signers stay on devnet. The stored preference is authoritative thereafter. - Switcher UX: an amber-weighted devnet/mainnet control in Settings, Network with the self-hosted relay beneath it. Switching to mainnet asks for a caution confirmation (a distinct amber sheet, not the red destructive one), and the signing sheets carry a network row that marks mainnet as real funds. A persistent network chip, the home footer, and the relay-card cluster label all follow the selected network. - Targets: the Cosign target becomes the combo (both URLs, neutral icon); the separate CosignDevnet target is retired. - Mainnet relay: adds core/fly.mainnet.toml (cosign-relay-mainnet); the Helius mainnet upstream is a Fly secret, never in the repo.
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.
Ship one app that carries both the devnet and mainnet relay configs with a runtime switcher, replacing the separate devnet bundle.