Fix verify signature
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "paravel",
|
||||
"version": "0.4.15",
|
||||
"version": "0.4.16",
|
||||
"description": "Yet another toolkit for nostr",
|
||||
"author": "hodlbod",
|
||||
"license": "MIT",
|
||||
|
||||
+1
-9
@@ -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),
|
||||
})
|
||||
|
||||
// ==========================================================================
|
||||
|
||||
Reference in New Issue
Block a user