File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -139,15 +139,19 @@ const SimulatorPopup: React.FC<ISimulatorPopup> = ({ amountToStake, isStaking })
139139 const { address } = useAccount ( ) ;
140140 const { data : stakeData } = useJurorStakeDetailsQuery ( address ?. toLowerCase ( ) as `0x${string } `) ;
141141 const courtStakeData = stakeData ?. jurorTokensPerCourts ?. find ( ( { court } ) => court . id === id ) ;
142- const jurorCurrentEffectiveStake = ! isUndefined ( courtStakeData )
143- ? Number ( formatEther ( courtStakeData . effectiveStake ) )
144- : undefined ;
145- const jurorCurrentSpecificStake = ! isUndefined ( courtStakeData )
146- ? Number ( formatEther ( courtStakeData . staked ) )
147- : undefined ;
142+ const jurorCurrentEffectiveStake = address
143+ ? ! isUndefined ( courtStakeData )
144+ ? Number ( formatEther ( courtStakeData . effectiveStake ) )
145+ : undefined
146+ : 0 ;
147+ const jurorCurrentSpecificStake = address
148+ ? ! isUndefined ( courtStakeData )
149+ ? Number ( formatEther ( courtStakeData . staked ) )
150+ : undefined
151+ : 0 ;
148152
149153 const timeframedCourtData = useHomePageExtraStats ( 30 ) ;
150- const { prices : pricesData } = useCoinPrice ( [ CoinIds . ETH , CoinIds . PNK ] ) ;
154+ const { prices : pricesData } = useCoinPrice ( [ CoinIds . ETH ] ) ;
151155 const ethPriceUSD = pricesData ? pricesData [ CoinIds . ETH ] ?. price : undefined ;
152156
153157 const foundCourt = useMemo ( ( ) => {
You can’t perform that action at this time.
0 commit comments