@@ -64,7 +64,12 @@ export const OracleIntegrityStaking = ({
64
64
) ;
65
65
66
66
const otherPublishers = useMemo (
67
- ( ) => publishers . filter ( ( publisher ) => ! publisher . isSelf ) ,
67
+ ( ) =>
68
+ publishers . filter (
69
+ ( publisher ) =>
70
+ ! publisher . isSelf &&
71
+ ( publisher . poolCapacity > 0n || hasAnyPositions ( publisher ) ) ,
72
+ ) ,
68
73
[ publishers ] ,
69
74
) ;
70
75
@@ -454,7 +459,10 @@ const Publisher = ({
454
459
publisher . publicKey ,
455
460
) ;
456
461
const utilizationPercent = useMemo (
457
- ( ) => Number ( ( 100n * publisher . poolUtilization ) / publisher . poolCapacity ) ,
462
+ ( ) =>
463
+ publisher . poolCapacity > 0n
464
+ ? Number ( ( 100n * publisher . poolUtilization ) / publisher . poolCapacity )
465
+ : Number . NaN ,
458
466
[ publisher . poolUtilization , publisher . poolCapacity ] ,
459
467
) ;
460
468
@@ -490,7 +498,9 @@ const Publisher = ({
490
498
"mix-blend-difference" : percentage < 100 ,
491
499
} ) }
492
500
>
493
- { `${ utilizationPercent . toString ( ) } %` }
501
+ { Number . isNaN ( utilizationPercent )
502
+ ? "Empty Pool"
503
+ : `${ utilizationPercent . toString ( ) } %` }
494
504
</ div >
495
505
</ div >
496
506
< Label className = "mt-1 flex flex-row items-center justify-center gap-1 text-sm" >
@@ -690,6 +700,15 @@ const useTransferActionForPublisher = (
690
700
[ action , publisher ] ,
691
701
) ;
692
702
703
+ const hasAnyPositions = ( { positions } : PublisherProps [ "publisher" ] ) =>
704
+ positions !== undefined &&
705
+ [
706
+ positions . warmup ,
707
+ positions . staked ,
708
+ positions . cooldown ,
709
+ positions . cooldown2 ,
710
+ ] . some ( ( value ) => value !== undefined && value > 0n ) ;
711
+
693
712
enum SortField {
694
713
PublisherName ,
695
714
PoolUtilization ,
0 commit comments