File tree 2 files changed +3
-3
lines changed
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 }) => {
99
99
chainId : DEFAULT_CHAIN ,
100
100
} ) ;
101
101
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 ) ) ;
103
103
const rounds = votingHistory ?. dispute ?. rounds ;
104
104
const jurorRewardsDispersed = useMemo ( ( ) => Boolean ( rounds ?. every ( ( round ) => round . jurorRewardsDispersed ) ) , [ rounds ] ) ;
105
105
const buttonText = useMemo ( ( ) => {
Original file line number Diff line number Diff line change @@ -133,11 +133,11 @@ const getCurrentLocalRound = (dispute?: ClassicAppealQuery["dispute"]) => {
133
133
} ;
134
134
135
135
const getOptions = ( dispute ?: DisputeDetails , classicDispute ?: ClassicAppealQuery [ "dispute" ] ) => {
136
- if ( ! dispute ) return [ ] ;
136
+ if ( ! dispute || Object . keys ( dispute ) . length === 0 ) return [ ] ;
137
137
const currentLocalRound = getCurrentLocalRound ( classicDispute ) ;
138
138
const classicAnswers = currentLocalRound ?. answers ;
139
139
140
- const options = dispute . answers . map ( ( answer ) => {
140
+ const options = dispute . answers ? .map ( ( answer ) => {
141
141
const classicAnswer = classicAnswers ?. find ( ( classicAnswer ) => BigInt ( classicAnswer . answerId ) == BigInt ( answer . id ) ) ;
142
142
// converting hexadecimal id to stringified bigint to match id fomr subgraph
143
143
return {
You can’t perform that action at this time.
0 commit comments