Customize nip 46 perms

This commit is contained in:
Jon Staab
2024-11-19 09:25:02 -08:00
parent 5b7985e5d9
commit ad58af8605
4 changed files with 17 additions and 9 deletions
+2 -2
View File
@@ -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