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
@@ -9,7 +9,7 @@
loading = $state(false)
clientSecret = makeSecret()
abortController = new AbortController()
broker = Nip46Broker.get({clientSecret: this.clientSecret, relays: SIGNER_RELAYS})
broker = new Nip46Broker({clientSecret: this.clientSecret, relays: SIGNER_RELAYS})
onNostrConnect: (response: Nip46ResponseWithResult) => void
constructor({onNostrConnect}: {onNostrConnect: (response: Nip46ResponseWithResult) => void}) {
@@ -45,6 +45,7 @@
}
stop() {
this.broker.cleanup()
this.abortController.abort()
}
}