Remove event id check in handleAuth since request/response might span multiple executors
This commit is contained in:
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "paravel",
|
||||
"version": "0.1.13",
|
||||
"version": "0.1.14",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "paravel",
|
||||
"version": "0.1.13",
|
||||
"version": "0.1.14",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"husky": "^8.0.3",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "paravel",
|
||||
"version": "0.1.13",
|
||||
"version": "0.1.14",
|
||||
"description": "Yet another toolkit for nostr",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
+1
-13
@@ -55,19 +55,7 @@ export class Executor {
|
||||
return {unsubscribe}
|
||||
}
|
||||
handleAuth({onAuth, onOk}) {
|
||||
let event
|
||||
|
||||
const unsubscribe = this.target.bus.addListeners({
|
||||
AUTH: async (url, challenge) => {
|
||||
event = await onAuth(url, challenge)
|
||||
},
|
||||
OK: (url, id, ok, message) => {
|
||||
if (id === event?.id) {
|
||||
event = null
|
||||
onOk(url, id, ok, message)
|
||||
}
|
||||
}
|
||||
})
|
||||
const unsubscribe = this.target.bus.addListeners({AUTH: onAuth, OK: onOk})
|
||||
|
||||
return {unsubscribe}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user