Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion web/src/components/Verdict/FinalDecision.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const FinalDecision: React.FC<IFinalDecision> = ({ arbitrable }) => {
chainId: DEFAULT_CHAIN,
});
const currentRuling = Number(currentRulingArray?.[0]);
const answer = populatedDisputeData?.answers?.[currentRuling! - 1];
const answer = populatedDisputeData?.answers?.find((answer) => BigInt(answer.id) === BigInt(currentRuling ?? 0));
const rounds = votingHistory?.dispute?.rounds;
const jurorRewardsDispersed = useMemo(() => Boolean(rounds?.every((round) => round.jurorRewardsDispersed)), [rounds]);
const buttonText = useMemo(() => {
Expand Down
4 changes: 2 additions & 2 deletions web/src/hooks/useClassicAppealContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,11 @@ const getCurrentLocalRound = (dispute?: ClassicAppealQuery["dispute"]) => {
};

const getOptions = (dispute?: DisputeDetails, classicDispute?: ClassicAppealQuery["dispute"]) => {
if (!dispute) return [];
if (!dispute || Object.keys(dispute).length === 0) return [];
const currentLocalRound = getCurrentLocalRound(classicDispute);
const classicAnswers = currentLocalRound?.answers;

const options = dispute.answers.map((answer) => {
const options = dispute.answers?.map((answer) => {
const classicAnswer = classicAnswers?.find((classicAnswer) => BigInt(classicAnswer.answerId) == BigInt(answer.id));
// converting hexadecimal id to stringified bigint to match id fomr subgraph
return {
Expand Down