Skip to content

Commit

Permalink
Fix event handler in load
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Staab committed Dec 3, 2024
1 parent a7c1c74 commit 8307b06
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/app/views/LoginBunker.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
if (await loginWithNip46({connectSecret, clientSecret, signerPubkey, relays})) {
boot()
abortController.abort()
}
} finally {
loading = false
Expand Down
4 changes: 1 addition & 3 deletions src/engine/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -758,9 +758,7 @@ export const load = (request: MySubscribeRequest) =>
const events: TrustedEvent[] = []
const sub = subscribe({...request, closeOnEose: true})

sub.emitter.on(SubscriptionEvent.Close, (url: string, event: TrustedEvent) =>
events.push(event),
)
sub.emitter.on(SubscriptionEvent.Event, (url: string, e: TrustedEvent) => events.push(e))
sub.emitter.on(SubscriptionEvent.Complete, (url: string) => resolve(events))
})

Expand Down

0 comments on commit 8307b06

Please sign in to comment.