From 086bcf33d532f61505a0bc19e8f2d1f08392acce Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sat, 4 Jul 2026 22:21:12 -0700 Subject: Per-network nostr sync + honest balance loading state MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit One shared d-tag let a network switch apply the mainnet snapshot to a signet wallet (the flash of wrong balance) and clobber mainnet state on the relays. Each network now syncs its own replaceable event (mainnet keeps the legacy bare tag), snapshots carry netName, and a foreign-net snapshot is never applied. The balance card spins until cache, Nostr, or a scan has populated this network once — 'scanning' alone missed the cache/Nostr window after wallet.load(). Co-Authored-By: Claude Fable 5 --- src/wallet.js | 1 + 1 file changed, 1 insertion(+) (limited to 'src/wallet.js') diff --git a/src/wallet.js b/src/wallet.js index 93ebe63..a5d7b6e 100644 --- a/src/wallet.js +++ b/src/wallet.js @@ -1754,6 +1754,7 @@ export class Wallet { return { v: 1, savedAt: Date.now(), + netName: this.netName, receive: this.receive, change: this.change, utxos: this.utxos, -- cgit v1.2.3