File tree 1 file changed +3
-11
lines changed
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 })
124
124
const { id } = useParams ( ) ;
125
125
const { address } = useAccount ( ) ;
126
126
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 ;
138
130
139
131
const timeframedCourtData = useHomePageExtraStats ( 30 ) ;
140
132
const { prices : pricesData } = useCoinPrice ( [ CoinIds . ETH ] ) ;
You can’t perform that action at this time.
0 commit comments