diff options
| author | Adam Soltys <[email protected]> | 2026-07-03 19:09:06 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-07-03 19:09:06 -0700 |
| commit | fd5306a3091e14904c06c09b03bb59ca7ea597de (patch) | |
| tree | 1dfc7600967c1c753705707fdc5965945b04368b /src | |
| parent | 61f1b8e45f64c490cace9c4d1e82198ed5bac33c (diff) | |
| download | coinosv3-fd5306a3091e14904c06c09b03bb59ca7ea597de.tar.gz coinosv3-fd5306a3091e14904c06c09b03bb59ca7ea597de.zip | |
Ark: on by default with a per-network default server
Mainnet defaults to Second (ark.second.tech), regtest to the local
stack. Testnet/mutinynet get their own preset lists (off/custom only —
no public ASP exists there) instead of falling back to mainnet's, and
stay off by default.
Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01QFAcD4V284DvYZZHP7Rxxy
Diffstat (limited to 'src')
| -rw-r--r-- | src/api.js | 15 | ||||
| -rw-r--r-- | src/i18n.js | 2 |
2 files changed, 15 insertions, 2 deletions
@@ -192,12 +192,25 @@ const ARK_PRESETS_BY_NET = { { id: 'second', label: 'Second (ark.second.tech)', ark: 'https://ark.second.tech', esplora: 'https://mempool.second.tech/api' }, { id: 'custom', label: 'Custom…', ark: '', esplora: '' }, ], + // No public ASP on these networks (Second runs signet + mainnet only) — + // custom lets you point at a self-hosted captaind. + testnet: [ + { id: 'off', label: 'Off', ark: '', esplora: '' }, + { id: 'custom', label: 'Custom…', ark: '', esplora: '' }, + ], + mutinynet: [ + { id: 'off', label: 'Off', ark: '', esplora: '' }, + { id: 'custom', label: 'Custom…', ark: '', esplora: '' }, + ], regtest: [ { id: 'off', label: 'Off', ark: '', esplora: '' }, { id: 'local', label: 'Local (regtest)', ark: 'http://localhost:3535', esplora: 'http://localhost:30002' }, { id: 'custom', label: 'Custom…', ark: '', esplora: '' }, ], }; +// On by default where a known-good server exists; the Settings card can +// always turn it off. +const ARK_DEFAULT = { mainnet: 'second', testnet: 'off', mutinynet: 'off', regtest: 'local' }; const ARK_PROVIDER_KEY = 'btc-wallet-ark-provider'; // selected preset id, per network const ARK_CUSTOM_KEY = 'btc-wallet-ark-custom'; // { ark, esplora } for custom, per network @@ -209,7 +222,7 @@ export function getArkProviderId(net = getNetwork()) { const id = localStorage.getItem(nk(ARK_PROVIDER_KEY, net)); if (id && arkPresets(net).some((p) => p.id === id)) return id; } catch {} - return 'off'; + return ARK_DEFAULT[net] || 'off'; } export function setArkProviderId(id, net = getNetwork()) { try { localStorage.setItem(nk(ARK_PROVIDER_KEY, net), id); } catch {} diff --git a/src/i18n.js b/src/i18n.js index cb5efb2..77a14c5 100644 --- a/src/i18n.js +++ b/src/i18n.js @@ -351,7 +351,7 @@ const STR = { receiveSpTab: 'Silent payment', receiveArkTab: 'Ark', arkReceiveIntro: 'Receive instantly over Ark — off-chain, self-custodial, no fees.', - arkDesc: 'Off-chain payments via an Ark server: instant, no mining fees, self-custodial (you can always exit on-chain). Off unless you pick a server.', + arkDesc: 'Off-chain payments via an Ark server: instant, no mining fees, self-custodial (you can always exit on-chain).', arkServerUrl: 'Ark server URL', arkEsploraUrl: 'Esplora URL (chain source)', arkWatchOnly: 'Ark needs the wallet keys — load the seed to use it.', |
