File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ const FinalDecision: React.FC<IFinalDecision> = ({ arbitrable }) => {
9999 chainId : DEFAULT_CHAIN ,
100100 } ) ;
101101 const currentRuling = Number ( currentRulingArray ?. [ 0 ] ) ;
102- const answer = populatedDisputeData ?. answers ?. [ currentRuling ! - 1 ] ;
102+ const answer = populatedDisputeData ?. answers ?. find ( ( answer ) => BigInt ( answer . id ) === BigInt ( currentRuling ?? 0 ) ) ;
103103 const rounds = votingHistory ?. dispute ?. rounds ;
104104 const jurorRewardsDispersed = useMemo ( ( ) => Boolean ( rounds ?. every ( ( round ) => round . jurorRewardsDispersed ) ) , [ rounds ] ) ;
105105 const buttonText = useMemo ( ( ) => {
Original file line number Diff line number Diff line change @@ -133,11 +133,11 @@ const getCurrentLocalRound = (dispute?: ClassicAppealQuery["dispute"]) => {
133133} ;
134134
135135const getOptions = ( dispute ?: DisputeDetails , classicDispute ?: ClassicAppealQuery [ "dispute" ] ) => {
136- if ( ! dispute ) return [ ] ;
136+ if ( ! dispute || Object . keys ( dispute ) . length === 0 ) return [ ] ;
137137 const currentLocalRound = getCurrentLocalRound ( classicDispute ) ;
138138 const classicAnswers = currentLocalRound ?. answers ;
139139
140- const options = dispute . answers . map ( ( answer ) => {
140+ const options = dispute . answers ? .map ( ( answer ) => {
141141 const classicAnswer = classicAnswers ?. find ( ( classicAnswer ) => BigInt ( classicAnswer . answerId ) == BigInt ( answer . id ) ) ;
142142 // converting hexadecimal id to stringified bigint to match id fomr subgraph
143143 return {
You can’t perform that action at this time.
0 commit comments