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",
|
"name": "paravel",
|
||||||
"version": "0.1.13",
|
"version": "0.1.14",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "paravel",
|
"name": "paravel",
|
||||||
"version": "0.1.13",
|
"version": "0.1.14",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"husky": "^8.0.3",
|
"husky": "^8.0.3",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "paravel",
|
"name": "paravel",
|
||||||
"version": "0.1.13",
|
"version": "0.1.14",
|
||||||
"description": "Yet another toolkit for nostr",
|
"description": "Yet another toolkit for nostr",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
+1
-13
@@ -55,19 +55,7 @@ export class Executor {
|
|||||||
return {unsubscribe}
|
return {unsubscribe}
|
||||||
}
|
}
|
||||||
handleAuth({onAuth, onOk}) {
|
handleAuth({onAuth, onOk}) {
|
||||||
let event
|
const unsubscribe = this.target.bus.addListeners({AUTH: onAuth, OK: onOk})
|
||||||
|
|
||||||
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)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
return {unsubscribe}
|
return {unsubscribe}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user