nip46: fixes from nak bunker tests.

This commit is contained in:
fiatjaf
2025-04-22 08:37:34 -03:00
parent b92e70270d
commit 631ff67d52
2 changed files with 8 additions and 0 deletions

View File

@@ -26,10 +26,14 @@ type StaticKeySigner struct {
func NewStaticKeySigner(secretKey [32]byte) StaticKeySigner {
return StaticKeySigner{
secretKey: secretKey,
sessions: make(map[nostr.PubKey]Session),
}
}
func (p *StaticKeySigner) GetSession(clientPubkey nostr.PubKey) (Session, bool) {
p.Lock()
defer p.Unlock()
session, ok := p.sessions[clientPubkey]
return session, ok
}