diff --git a/utils.ts b/utils.ts index 59a8dec..3c55f7f 100644 --- a/utils.ts +++ b/utils.ts @@ -128,6 +128,7 @@ export function mergeReverseSortedLists(list1: NostrEvent[], list2: NostrEvent[] * Checks if a string is a 64-char lowercase hex string as most Nostr ids and pubkeys. */ export function isHex32(input: string): boolean { + if (input.length !== 64) return false for (let i = 0; i < 64; i++) { let cc = input.charCodeAt(i) if (isNaN(cc) || cc < 48 || cc > 102 || (cc > 57 && cc < 97)) {