Catch failure to verify events
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "paravel",
|
"name": "paravel",
|
||||||
"version": "0.4.18",
|
"version": "0.4.19",
|
||||||
"description": "Yet another toolkit for nostr",
|
"description": "Yet another toolkit for nostr",
|
||||||
"author": "hodlbod",
|
"author": "hodlbod",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|||||||
+7
-1
@@ -82,7 +82,13 @@ export const hasValidSignature = cached<string, boolean, [Event]>({
|
|||||||
return 'invalid'
|
return 'invalid'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getValue: ([e]: [Event]) => verifyEvent(e),
|
getValue: ([e]: [Event]) => {
|
||||||
|
try {
|
||||||
|
return verifyEvent(e)
|
||||||
|
} catch (err) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
|
|||||||
Reference in New Issue
Block a user