blocks: pass keypair instead of privkey to avoid pubkey gen
Generating a pubkey is quite slow, so pass a keypair instead of privkey
This commit is contained in:
@@ -11,9 +11,9 @@ enum NoteContent {
|
||||
case note(NostrEvent)
|
||||
case content(String, TagsSequence?)
|
||||
|
||||
init(note: NostrEvent, privkey: Privkey?) {
|
||||
init(note: NostrEvent, keypair: Keypair) {
|
||||
if note.known_kind == .dm {
|
||||
self = .content(note.get_content(privkey), note.tags)
|
||||
self = .content(note.get_content(keypair), note.tags)
|
||||
} else {
|
||||
self = .note(note)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user