misc: don't immediately hex encode event commitment

keep it separate for now, since we're moving to more low level. We
probably won't even use this, but this is cleaner logicwise anyway.
This commit is contained in:
William Casarin
2023-07-22 15:40:22 -07:00
parent 0263c11a94
commit af7ea7024f
5 changed files with 12 additions and 12 deletions

View File

@@ -822,7 +822,7 @@ func process_metadata_profile(our_pubkey: String, profiles: Profiles, profile: P
}
func guard_valid_event(events: EventCache, ev: NostrEvent, callback: @escaping () -> Void) {
guard ev.id==calculate_event_id(ev: ev) else {
guard ev.id == hex_encode(calculate_event_id(ev: ev)) else {
return
}
let validated = events.is_event_valid(ev.id)