Use non-singleton broker

This commit is contained in:
Jon Staab
2025-05-07 13:53:58 -07:00
parent f2eb04adff
commit 94a0077b09
5 changed files with 9 additions and 6 deletions
+2 -1
View File
@@ -46,12 +46,13 @@
try {
const {clientSecret} = controller
const broker = Nip46Broker.get({relays, clientSecret, signerPubkey})
const broker = new Nip46Broker({relays, clientSecret, signerPubkey})
const result = await broker.connect(connectSecret, NIP46_PERMS)
const pubkey = await broker.getPublicKey()
// TODO: remove ack result
if (pubkey && ["ack", connectSecret].includes(result)) {
broker.cleanup()
controller.stop()
await loadUserData(pubkey)