Add wrapped signer and signer log; fix adapter unsubscribing in app storage; add more details to thunk signing error, handle signing errors in auth

This commit is contained in:
Jon Staab
2025-07-29 11:11:40 -07:00
parent dc9a873d92
commit bd67f2763d
5 changed files with 101 additions and 15 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
import EventEmitter from "events"
import {on, poll, call} from "@welshman/lib"
import {on, poll, call, tryCatch} from "@welshman/lib"
import {SignedEvent, StampedEvent} from "@welshman/util"
import {makeRelayAuth} from "@welshman/util"
import {isRelayAuth, isClientAuth, isRelayOk, RelayMessage} from "./message.js"
@@ -101,7 +101,7 @@ export class AuthState extends EventEmitter {
this.setStatus(AuthStatus.PendingSignature)
const template = makeRelayAuth(this.socket.url, this.challenge)
const event = await sign(template)
const event = await tryCatch(() => sign(template))
if (event) {
this.request = event.id