Fix verify signature

This commit is contained in:
Jon Staab
2023-12-15 14:59:23 -08:00
parent 03c2c369f5
commit 2a402f1190
2 changed files with 2 additions and 10 deletions
+1 -9
View File
@@ -76,15 +76,7 @@ export const createEvent = (kind: number, {content = "", tags = [], created_at =
export const hasValidSignature = cached<string, boolean, [Event]>({
maxSize: 10000,
getKey: ([e]: [Event]) => [getEventHash(e), e.sig].join(":"),
getValue: ([e]: [Event]) => {
try {
verifySignature(e)
} catch (e) {
return false
}
return true
},
getValue: ([e]: [Event]) => verifySignature(e),
})
// ==========================================================================