From ad58af86059f01ed3110d3c9d6e38c061258c0e4 Mon Sep 17 00:00:00 2001 From: Jon Staab Date: Tue, 19 Nov 2024 09:25:02 -0800 Subject: [PATCH] Customize nip 46 perms --- src/app/commands.ts | 4 ++-- src/app/components/LogInBunker.svelte | 6 +++--- src/app/components/SignUp.svelte | 8 ++++---- src/app/state.ts | 8 ++++++++ 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/src/app/commands.ts b/src/app/commands.ts index f58afdb12..504a461f0 100644 --- a/src/app/commands.ts +++ b/src/app/commands.ts @@ -46,7 +46,6 @@ import { nip44EncryptToSelf, loadRelay, addSession, - nip46Perms, subscribe, } from "@welshman/app" import { @@ -55,6 +54,7 @@ import { userMembership, MEMBERSHIPS, INDEXER_RELAYS, + NIP46_PERMS, loadMembership, loadSettings, getDefaultPubkeys, @@ -123,7 +123,7 @@ export const subscribePersistent = (request: SubscribeRequestWithHandlers) => { export const loginWithNip46 = async (token: string, handler: Nip46Handler) => { const secret = makeSecret() const broker = Nip46Broker.get({secret, handler}) - const result = await broker.connect(token, nip46Perms) + const result = await broker.connect(token, NIP46_PERMS) if (!result) return false diff --git a/src/app/components/LogInBunker.svelte b/src/app/components/LogInBunker.svelte index 7e92ce4d6..d50bbea39 100644 --- a/src/app/components/LogInBunker.svelte +++ b/src/app/components/LogInBunker.svelte @@ -1,7 +1,7 @@