From e59ed2d1106396750d1fdb15fe98a4b7ab2c80fc Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Tue, 22 Sep 2026 10:14:59 -0700 Subject: Ark server is a setting again; an address on another server falls back to Lightning. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Settings → Advanced → Ark server: coinos, Second (ark.second.tech) or a custom server, per network — the stored choice is honoured on mainnet again. Ark state is kept per server, so switching hides but never loses coins; the card says what the current server holds and asks before letting go. After a switch the reusable address, the nostr advert and the payment name's ark= instruction follow the new server. Sends between servers can't be arkoor, so an Ark address that names a different server (its first bytes hash the server key) is treated as no Ark address at all in the pay ladder — a coinos name or npub then goes over Lightning by itself — and a pasted one is refused with the reason. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01Tmfg8k5f3TbNJS34qiqHAp --- src/api.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/api.js') diff --git a/src/api.js b/src/api.js index ea63fdc..c0ecb4b 100644 --- a/src/api.js +++ b/src/api.js @@ -271,10 +271,8 @@ export function arkPresets(net = getNetwork()) { return ARK_PRESETS_BY_NET[net] || ARK_PRESETS_BY_NET.mainnet; } export function getArkProviderId(net = getNetwork()) { - // Mainnet always rides coinos — the provider picker was removed from - // Settings, so a stale stored choice must not silently win. Dev networks - // still honor a stored id (regtest/mutinynet testing needs it). - if (net === 'mainnet') return 'coinos'; + // A stored choice wins on every network (Settings → Advanced → Ark server + // offers coinos, Second, or a custom server); the default is coinos. try { const id = localStorage.getItem(nk(ARK_PROVIDER_KEY, net)); if (id && arkPresets(net).some((p) => p.id === id)) return id; -- cgit v1.2.3