We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 28723c4 commit 72c5508Copy full SHA for 72c5508
nr-app/src/redux/slices/events.slice.ts
@@ -1,5 +1,5 @@
1
import { ID_SEPARATOR } from "@/constants";
2
-import { Event } from "@common/mod";
+import { Event, isValidEvent } from "@common/mod";
3
import {
4
createEntityAdapter,
5
createSlice,
@@ -75,6 +75,12 @@ export const eventsSlice = createSlice({
75
action: PayloadAction<{ event: Event; fromRelay: string }>,
76
) => {
77
const { event, fromRelay: seenOnRelay } = action.payload;
78
+
79
+ // Skip events which don't pass validation
80
+ if (!isValidEvent(event)) {
81
+ return;
82
+ }
83
84
const storageId = getStorageId(event);
85
86
const eventWithMetadata = {
0 commit comments