From 703ee6e1281e72ec00f65768d7de7a015c242abb Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 18 Sep 2026 23:12:18 -0700 Subject: Accounts from the header, snapshot-first Spending restore, name ownership grants. Header buttons always leave the current feature screen; an account with no remembered nostr identity opens Accounts instead of nothing. Logout confirms in place. A scan finishing after logout or an account switch no longer drops the new session into offline mode (stateGeneration guards in sync + ark). Spending restores from the snapshot first. A migration grant names the identity that owns an address; its manager may register it without becoming that identity (names/ownership.js). Browser tests for account access, profile retry, spending restore, thread reply focus, custom-emoji reactions and registry ownership. Co-Authored-By: Claude Fable 5.1 --- names/ownership.js | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 names/ownership.js (limited to 'names/ownership.js') diff --git a/names/ownership.js b/names/ownership.js new file mode 100644 index 0000000..19ae4ef --- /dev/null +++ b/names/ownership.js @@ -0,0 +1,10 @@ +// A migration grant names the identity that owns the address. Its manager +// may submit the registration without becoming that identity. +export function registrationIdentity({ existing, signer, manager, grant, granted }) { + const pubkey = existing?.pubkey || (granted ? grant.pubkey : signer); + const nominated = /^[0-9a-f]{64}$/.test(manager || '') && manager !== pubkey; + return { + pubkey, + manager: nominated ? manager : existing?.manager || (granted ? grant.manager : undefined), + }; +} -- cgit v1.2.3