File tree Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -124,17 +124,9 @@ const SimulatorPopup: React.FC<ISimulatorPopup> = ({ amountToStake, isStaking })
124124 const { id } = useParams ( ) ;
125125 const { address } = useAccount ( ) ;
126126 const { data : stakeData } = useJurorStakeDetailsQuery ( address ?. toLowerCase ( ) as `0x${string } `) ;
127- const courtStakeData = stakeData ?. jurorTokensPerCourts ?. find ( ( { court } ) => court . id === id ) ;
128- const jurorCurrentEffectiveStake = address
129- ? ! isUndefined ( courtStakeData )
130- ? Number ( formatEther ( courtStakeData . effectiveStake ) )
131- : undefined
132- : 0 ;
133- const jurorCurrentSpecificStake = address
134- ? ! isUndefined ( courtStakeData )
135- ? Number ( formatEther ( courtStakeData . staked ) )
136- : undefined
137- : 0 ;
127+ const jurorStakeData = stakeData ?. jurorTokensPerCourts ?. find ( ( { court } ) => court . id === id ) ;
128+ const jurorCurrentEffectiveStake = address && jurorStakeData ? Number ( formatEther ( jurorStakeData . effectiveStake ) ) : 0 ;
129+ const jurorCurrentSpecificStake = address && jurorStakeData ? Number ( formatEther ( jurorStakeData . staked ) ) : 0 ;
138130
139131 const timeframedCourtData = useHomePageExtraStats ( 30 ) ;
140132 const { prices : pricesData } = useCoinPrice ( [ CoinIds . ETH ] ) ;
You can’t perform that action at this time.
0 commit comments