Skip to content

Commit 78214f3

Browse files
committed
fix: improve ruling handling in dispute history section
1 parent 14c8eba commit 78214f3

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/components/case-round-history.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,17 @@ import useChainId from "../hooks/use-chain-id";
88
import ScrollBar from "./scroll-bar";
99
import axios from "axios";
1010
import useSWR from "swr";
11+
import Web3 from "web3";
1112
import { RTA_LABEL } from "../temp/answer-string";
1213

1314
const { useDrizzle } = drizzleReactHooks;
15+
const { toBN } = Web3.utils;
1416

1517
export default function CaseRoundHistory({ ID, dispute, ruling }) {
1618
const { drizzle, useCacheCall } = useDrizzle();
1719
const getMetaEvidence = useDataloader.getMetaEvidence();
1820
const [round, setRound] = useState(dispute.votesLengths.length - 1);
19-
const [rulingOption, setRulingOption] = useState(ruling || 1);
21+
const [rulingOption, setRulingOption] = useState(ruling || "1");
2022
const [justificationIndex, setJustificationIndex] = useState(0);
2123
const chainId = useChainId();
2224

@@ -108,7 +110,7 @@ export default function CaseRoundHistory({ ID, dispute, ruling }) {
108110
{metaEvidence.rulingOptions?.reserved &&
109111
Object.keys(metaEvidence.rulingOptions.reserved).map((key) => (
110112
<Col lg={24} key={key}>
111-
<Radio.Button size="large" value={key}>
113+
<Radio.Button size="large" value={toBN(key).toString()}>
112114
{metaEvidence.rulingOptions.reserved[key]}
113115
</Radio.Button>
114116
</Col>

0 commit comments

Comments
 (0)