diff options
| author | Adam Soltys <[email protected]> | 2026-08-17 15:22:11 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-08-17 15:22:11 -0700 |
| commit | de727b751c9242eedd41d0ea85299b6e496a6a4c (patch) | |
| tree | fba844f00bb908c2c82cbcda6cb09492329a9951 /src | |
| parent | 00a0be5fcd8157f145c63df44982b4f74960c815 (diff) | |
| download | coinosv3-de727b751c9242eedd41d0ea85299b6e496a6a4c.tar.gz coinosv3-de727b751c9242eedd41d0ea85299b6e496a6a4c.zip | |
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 <[email protected]>
Claude-Session: https://claude.ai/code/session_01JtaatFfAbx91Nh3xqKVqKz
Diffstat (limited to 'src')
| -rw-r--r-- | src/app.js | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -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. |
