@@ -8,15 +8,17 @@ import useChainId from "../hooks/use-chain-id";
88import ScrollBar from "./scroll-bar" ;
99import axios from "axios" ;
1010import useSWR from "swr" ;
11+ import Web3 from "web3" ;
1112import { RTA_LABEL } from "../temp/answer-string" ;
1213
1314const { useDrizzle } = drizzleReactHooks ;
15+ const { toBN } = Web3 . utils ;
1416
1517export 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