Skip to content

Commit b85c0ae

Browse files
committed
mutually exclusive filters
1 parent f0cf58d commit b85c0ae

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/json-rpc/polkadot/chain-head/ops/handler.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ const forwardHandler = ({
8383
);
8484

8585
const notification$ = upstream.notification$.pipe(
86-
filter(isForOp),
86+
filter(
87+
(msg) => isForOp(msg) && !terminus.has(msg.params!.result.event),
88+
),
8789
takeUntil(done$),
8890
);
8991

@@ -232,7 +234,9 @@ const forwardWithCacheHandler = ({
232234
);
233235

234236
const notification$ = upstream.notification$.pipe(
235-
filter(isForOp),
237+
filter(
238+
(msg) => isForOp(msg) && !terminus.has(msg.params!.result.event),
239+
),
236240
takeUntil(done$),
237241
);
238242

0 commit comments

Comments
 (0)