URL Query Parameter for Testnet Mode
Problem
Users cannot share direct links to testnet assets. Currently, the mainnet/testnet toggle state is only persisted in localStorage, making it impossible to deep-link to testnet resources or bookmark testnet views.
Scope
- Add support for a
testnet URL query parameter
- Synchronize the toggle UI with this parameter
- Ensure VeraxSdk and all Graph queries (single-chain and multichain) respect the active network type
Behavior
| URL |
Expected State |
No testnet param |
Mainnet (default) |
?testnet=true |
Testnet |
?testnet=false or any other value |
Mainnet |
Acceptance Criteria
Edge Cases
- Conflicting state: URL param takes precedence over localStorage on initial load
- Invalid param values (e.g.,
?testnet=maybe) default to mainnet
URL Query Parameter for Testnet Mode
Problem
Users cannot share direct links to testnet assets. Currently, the mainnet/testnet toggle state is only persisted in localStorage, making it impossible to deep-link to testnet resources or bookmark testnet views.
Scope
testnetURL query parameterBehavior
testnetparam?testnet=true?testnet=falseor any other valueAcceptance Criteria
?testnet=trueswitches to testnet modefindByMultiChain, etc.) target the correct chain settestnet=falseswitches back to mainnet?testnet=truework correctly when opened in a new sessionEdge Cases
?testnet=maybe) default to mainnet