@@ -187,19 +187,10 @@ const Court: React.FC = () => {
187187 ) ;
188188 } , [ supportedDisputeKits , availableDisputeKits ] ) ;
189189
190- const selectedDisputeKitId = useMemo ( ( ) => {
191- // If there's only 1 supported dispute kit, select it by default
192- if ( disputeKitOptions . length === 1 ) {
193- return disputeKitOptions [ 0 ] . value ;
194- }
195- // If there's no saved selection, select nothing
196- return disputeData . disputeKitId ?? - 1 ;
197- } , [ disputeKitOptions , disputeData . disputeKitId ] ) ;
198-
199190 const isGatedDisputeKit = useMemo ( ( ) => {
200- const options = disputeKitOptions . find ( ( dk ) => String ( dk . value ) === String ( selectedDisputeKitId ) ) ;
191+ const options = disputeKitOptions . find ( ( dk ) => String ( dk . value ) === String ( disputeData . disputeKitId ) ) ;
201192 return options ?. gated ?? false ;
202- } , [ disputeKitOptions , selectedDisputeKitId ] ) ;
193+ } , [ disputeKitOptions , disputeData . disputeKitId ] ) ;
203194
204195 // Token validation for token gate address (conditional based on ERC1155 checkbox)
205196 const tokenGateAddress = ( disputeData . disputeKitData as IGatedDisputeData ) ?. tokenGate ?? "" ;
@@ -311,7 +302,7 @@ const Court: React.FC = () => {
311302 < StyledDropdownSelect
312303 items = { disputeKitOptions }
313304 placeholder = { { text : "Select Dispute Kit" } }
314- defaultValue = { selectedDisputeKitId }
305+ defaultValue = { disputeData . disputeKitId }
315306 callback = { handleDisputeKitChange }
316307 />
317308 ) }
0 commit comments