Skip to content

Commit

Permalink
Throw Instead of fatalError()
Browse files Browse the repository at this point in the history
  • Loading branch information
joelklabo committed Aug 12, 2023
1 parent 5f91d87 commit f90b9fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/NostrSDK/Events/DirectMessageEvent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public final class DirectMessageEvent: NostrEvent, DirectMessageEncrypting {
}

guard let recipientPublicKeyHex = recipient?.value, let recipientPublicKey = PublicKey(hex: recipientPublicKeyHex) else {
fatalError()
throw DirectMessageEncryptingError.pubkeyParsing
}

return try decrypt(encryptedContent: content, privateKey: privateKey, publicKey: recipientPublicKey)
Expand Down

0 comments on commit f90b9fd

Please sign in to comment.