From de727b751c9242eedd41d0ea85299b6e496a6a4c Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 17 Aug 2026 15:22:11 -0700 Subject: A mainnet name stops vouching for mutinynet spending: the claimed-address evidence only counts on the network it was claimed on Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01JtaatFfAbx91Nh3xqKVqKz --- src/app.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/app.js b/src/app.js index c9ba70a..5d3b049 100644 --- a/src/app.js +++ b/src/app.js @@ -2867,7 +2867,9 @@ function onboardScreen() { // network without names, or skipping the spend step, must not conjure // a Spending wallet nobody asked for. const acc = activeAccount(); - const addr = featureHook('namesAddress'); + // same mainnet-only rule as spendingActive: a stored mainnet name must + // not vouch for spending on another network + const addr = getNetwork() === 'mainnet' ? featureHook('namesAddress') : null; const spendReady = (!!addr && !/^npub1/.test(addr)) || (featureHook('spendingSat') || 0) > 0; if (spendReady) { if (acc && !acc.spendingSetup) { acc.spendingSetup = true; persistAccounts(); } @@ -2989,7 +2991,10 @@ function spendingActive() { if (!featureHook('arkReady')) return false; const acc = activeAccount(); if (acc?.spendingSetup) return true; - const addr = featureHook('namesAddress'); + // A claimed payment address proves spending on MAINNET only: names feature + // state is stored per-wallet without a network, so a mainnet name would + // otherwise conjure a Spending wallet on mutinynet nobody set up. + const addr = getNetwork() === 'mainnet' ? featureHook('namesAddress') : null; const evident = (featureHook('spendingSat') || 0) > 0 || (!!addr && !/^npub1/.test(addr)); // Latch demonstrated use onto the record, so the Wallets list keeps showing // this seed's Spending side even while it's locked or not the active one. -- cgit v1.2.3