aboutsummaryrefslogtreecommitdiffstats
path: root/src/api.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-08-16 17:00:28 -0700
committerAdam Soltys <[email protected]>2026-08-16 17:00:28 -0700
commit65064e2bb0eefb90c3585bf49fe7a5c038da6454 (patch)
treeffc0a16335f9e72f5ef0c46d2c2402f7f0c757d6 /src/api.js
parent1c823643aedc36c159a52c3285fdf9693bdfde7d (diff)
downloadcoinosv3-65064e2bb0eefb90c3585bf49fe7a5c038da6454.tar.gz
coinosv3-65064e2bb0eefb90c3585bf49fe7a5c038da6454.zip
Staging wears its name on the logo and deals in play money: HAL_TARGET=staging stamps the brand, renames the PWA, and starts fresh wallets on Mutinynet — one master, no diverging branch
Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JtaatFfAbx91Nh3xqKVqKz
Diffstat (limited to 'src/api.js')
-rw-r--r--src/api.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/api.js b/src/api.js
index c081cfe..c020a0c 100644
--- a/src/api.js
+++ b/src/api.js
@@ -6,6 +6,8 @@
// - a 429 from ANY request immediately backs off ALL subsequent requests
// (global exponential pause), easing back as requests succeed.
+import { STAGING } from './build-flags.js';
+
// Block explorer selection, stored per network (see the per-network presets +
// nk() helper below). Each network defaults to its first esplora preset; users
// can pick another or a custom Esplora/electrs REST URL (their own node).
@@ -41,7 +43,9 @@ export function getNetwork() {
const n = localStorage.getItem(NETWORK_KEY);
if (NETWORKS.some((x) => x.id === n)) return n;
} catch {}
- return 'mainnet';
+ // Staging builds default fresh profiles to mutinynet (play money); a
+ // stored choice — including mainnet — always wins over the default.
+ return STAGING ? 'mutinynet' : 'mainnet';
}
export function setNetwork(net) {
try { localStorage.setItem(NETWORK_KEY, net); } catch {}