Refactor key decoding logic to use common function

This commit is contained in:
dd dd 2024-09-02 21:32:49 +02:00
parent 95cb6b5b71
commit 1a7ea5bb1f

View File

@ -78,7 +78,7 @@ func (e *Exit) handleCertificateEvent(
if privateKeyEvent == nil { if privateKeyEvent == nil {
return tls.Certificate{}, errNoCertificateEvent return tls.Certificate{}, errNoCertificateEvent
} }
privateKeyBytes, targetPublicKeyBytes, err := protocol.GetEncryptionKeys(e.config.NostrPrivateKey, msg.PubKey) privateKeyBytes, targetPublicKeyBytes, err := protocol.GetEncryptionKeys(e.config.NostrPrivateKey, privateKeyEvent.PubKey)
if err != nil { if err != nil {
return tls.Certificate{}, err return tls.Certificate{}, err
} }