From ce8c5931e5697fc979452ce3149cb758c98bdefe Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sat, 31 Jan 2026 06:53:22 +0000 Subject: [PATCH] chore(ai): event schema validation tool + fixes Co-authored-by: PR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> --- js/nostr/client.js | 2 +- tests/hashtag-preferences.test.mjs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/js/nostr/client.js b/js/nostr/client.js index 1ab71bac..2b7e5ae3 100644 --- a/js/nostr/client.js +++ b/js/nostr/client.js @@ -2079,7 +2079,7 @@ export class NostrClient { } const permissionResult = await this.ensureExtensionPermissions( - DEFAULT_NIP07_CORE_METHODS, + DEFAULT_NIP07_PERMISSION_METHODS, { context: "login", logMetrics: true, showStatus: false }, ); if (!permissionResult.ok) { diff --git a/tests/hashtag-preferences.test.mjs b/tests/hashtag-preferences.test.mjs index f72827cd..50d43e57 100644 --- a/tests/hashtag-preferences.test.mjs +++ b/tests/hashtag-preferences.test.mjs @@ -251,13 +251,16 @@ test( let fetchCalls = 0; nostrClient.fetchListIncrementally = async () => { fetchCalls += 1; - return fetchCalls === 1 ? [event] : []; + // Always return the event so the second load call (with permissions) finds data + return [event]; }; nostrClient.relays = relayUrls; nostrClient.writeRelays = relayUrls; const decryptCalls = []; window.nostr = { + enable: async () => true, + getPublicKey: async () => pubkey, nip04: { decrypt: async () => { decryptCalls.push("nip04");