mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-03-17 13:22:56 +01:00
nip46: fix HandleRequest request parsing logic
Move out the `session.ParseRequest` call from the `else` branch. This caused an empty `Request` object to be used down in the function when the `Session` already existed.
This commit is contained in:
parent
db39f79f23
commit
27bd9bfc8c
@ -105,11 +105,11 @@ func (p *DynamicSigner) HandleRequest(event *nostr.Event) (
|
||||
}
|
||||
|
||||
p.setSession(event.PubKey, session)
|
||||
}
|
||||
|
||||
req, err = session.ParseRequest(event)
|
||||
if err != nil {
|
||||
return req, resp, eventResponse, fmt.Errorf("error parsing request: %w", err)
|
||||
}
|
||||
req, err = session.ParseRequest(event)
|
||||
if err != nil {
|
||||
return req, resp, eventResponse, fmt.Errorf("error parsing request: %w", err)
|
||||
}
|
||||
|
||||
var secret string
|
||||
|
Loading…
x
Reference in New Issue
Block a user