@@ -25,6 +25,7 @@ import {
25
25
explorerVaa ,
26
26
} from '@wormhole-foundation/wormhole-monitor-common' ;
27
27
import { Environment , useCurrentEnvironment , useNetworkContext } from '../contexts/NetworkContext' ;
28
+ import { CloudGovernorInfo } from '../hooks/useCloudGovernorInfo' ;
28
29
29
30
type LastBlockByChain = { [ chainId : string ] : string } ;
30
31
type CountsByChain = {
@@ -291,7 +292,7 @@ function ReobserveCode({ misses }: { misses: MissesByChain | null }) {
291
292
) : null ;
292
293
}
293
294
294
- function Misses ( ) {
295
+ function Misses ( { governorInfo } : { governorInfo ?: CloudGovernorInfo | null } ) {
295
296
const { currentNetwork } = useNetworkContext ( ) ;
296
297
const { showAllMisses } = useSettings ( ) ;
297
298
const [ missesWrapper , setMissesWrapper ] = useState < DataWrapper < MissesByChain > > (
@@ -329,7 +330,17 @@ function Misses() {
329
330
. map ( ( [ chain , info ] ) => {
330
331
const filteredMisses = showAllMisses
331
332
? info . messages
332
- : info . messages . filter ( ( message ) => message . timestamp < twoHoursAgo ) ;
333
+ : info . messages
334
+ . filter ( ( message ) => message . timestamp < twoHoursAgo )
335
+ . filter (
336
+ ( message ) =>
337
+ ! governorInfo ?. enqueuedVAAs . some (
338
+ ( enqueuedVAA ) =>
339
+ enqueuedVAA . emitterChain === message . chain &&
340
+ enqueuedVAA . emitterAddress === message . emitter &&
341
+ enqueuedVAA . sequence === message . seq
342
+ )
343
+ ) ;
333
344
return filteredMisses . length === 0 ? null : (
334
345
< CollapsibleSection
335
346
key = { chain }
@@ -400,7 +411,7 @@ function SettingsButton() {
400
411
) ;
401
412
}
402
413
403
- function Monitor ( ) {
414
+ function Monitor ( { governorInfo } : { governorInfo ?: CloudGovernorInfo | null } ) {
404
415
const { currentNetwork } = useNetworkContext ( ) ;
405
416
const [ lastBlockByChainWrapper , setLastBlockByChainWrapper ] = useState <
406
417
DataWrapper < LastBlockByChain >
@@ -466,7 +477,7 @@ function Monitor() {
466
477
< SettingsButton />
467
478
</ Box >
468
479
< Box mb = { 2 } >
469
- < Misses />
480
+ < Misses governorInfo = { governorInfo } />
470
481
</ Box >
471
482
< Typography variant = "h4" > Chains</ Typography >
472
483
< Box pl = { 0.5 } >
0 commit comments