Update welshman

This commit is contained in:
Jon Staab
2024-10-29 13:20:59 -07:00
parent 8e97dd0c69
commit 3f143b7aa2
8 changed files with 96 additions and 33 deletions
+4 -3
View File
@@ -28,7 +28,7 @@
})
}
const signupBroker = Nip46Broker.get("", secret, handler)
const signupBroker = Nip46Broker.get({secret, handler})
const pubkey = await signupBroker.createAccount(username, nip46Perms)
if (!pubkey) {
@@ -38,10 +38,11 @@
})
}
const loginBroker = Nip46Broker.get(pubkey, secret, handler)
// Gotta use user pubkey as the handler pubkey for historical reasons
const loginBroker = Nip46Broker.get({secret, handler: {...handler, pubkey}})
if (await loginBroker.connect("", nip46Perms)) {
addSession({method: "nip46", pubkey, secret, handler})
addSession({method: "nip46", pubkey, secret, handler: {...handler, pubkey}})
pushToast({message: "Successfully logged in!"})
clearModals()
} else {