File tree Expand file tree Collapse file tree 4 files changed +13
-16
lines changed
web/src/pages/Cases/CaseDetails Expand file tree Collapse file tree 4 files changed +13
-16
lines changed Original file line number Diff line number Diff line change 11import React , { useState } from "react" ;
22import styled from "styled-components" ;
33import { useParams } from "react-router-dom" ;
4- import { useAccount , useBalance , useNetwork } from "wagmi" ;
4+ import { useAccount , useBalance } from "wagmi" ;
55import { useDebounce } from "react-use" ;
66import { Field , Button } from "@kleros/ui-components-library" ;
77import { wrapWithToast } from "utils/wrapWithToast" ;
@@ -59,8 +59,6 @@ const Fund: React.FC = () => {
5959 const [ isSending , setIsSending ] = useState ( false ) ;
6060 const fundAppeal = useFundAppeal ( parsedAmount ) ;
6161
62- const { chain } = useNetwork ( ) ;
63-
6462 return needFund ? (
6563 < div >
6664 < label > How much ETH do you want to contribute?</ label >
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import Modal from "react-modal";
55import { Textarea , Button } from "@kleros/ui-components-library" ;
66import { wrapWithToast , OPTIONS as toastOptions } from "utils/wrapWithToast" ;
77import { uploadFormDataToIPFS } from "utils/uploadFormDataToIPFS" ;
8- import { useWalletClient , useNetwork } from "wagmi" ;
8+ import { useWalletClient } from "wagmi" ;
99import { EnsureChain } from "components/EnsureChain" ;
1010import { prepareWriteDisputeKitClassic } from "hooks/contracts/generated" ;
1111
@@ -15,7 +15,6 @@ const SubmitEvidenceModal: React.FC<{
1515 close : ( ) => void ;
1616} > = ( { isOpen, evidenceGroup, close } ) => {
1717 const { data : walletClient } = useWalletClient ( ) ;
18- const { chain } = useNetwork ( ) ;
1918 const [ isSending , setIsSending ] = useState ( false ) ;
2019 const [ message , setMessage ] = useState ( "" ) ;
2120 return (
Original file line number Diff line number Diff line change 11import React , { useState } from "react" ;
22import styled from "styled-components" ;
33import { useParams } from "react-router-dom" ;
4- import { useAccount , useNetwork } from "wagmi" ;
4+ import { useAccount } from "wagmi" ;
55import { Button , Searchbar } from "@kleros/ui-components-library" ;
66import { useEvidenceGroup } from "queries/useEvidenceGroup" ;
77import { useEvidences } from "queries/useEvidences" ;
@@ -28,7 +28,6 @@ const Evidence: React.FC<{ arbitrable?: string }> = ({ arbitrable }) => {
2828 const { data : evidenceGroup } = useEvidenceGroup ( id , arbitrable ) ;
2929 const { data } = useEvidences ( evidenceGroup ) ;
3030 const { address } = useAccount ( ) ;
31- const { chain } = useNetwork ( ) ;
3231 return (
3332 < Container >
3433 { evidenceGroup && (
Original file line number Diff line number Diff line change @@ -48,15 +48,16 @@ const Binary: React.FC<{ arbitrable?: string; voteIDs: string[] }> = ({ arbitrab
4848 />
4949 < OptionsContainer >
5050 { metaEvidence ?. rulingOptions ?. titles ?. map ( ( answer : string , i : number ) => {
51- < EnsureChain >
52- < Button
53- key = { i }
54- text = { answer }
55- disabled = { isSending }
56- isLoading = { chosenOption === i + 1 }
57- onClick = { ( ) => handleVote ( i + 1 ) }
58- />
59- </ EnsureChain > ;
51+ return (
52+ < EnsureChain key = { i } >
53+ < Button
54+ text = { answer }
55+ disabled = { isSending }
56+ isLoading = { chosenOption === i + 1 }
57+ onClick = { ( ) => handleVote ( i + 1 ) }
58+ />
59+ </ EnsureChain >
60+ ) ;
6061 } ) }
6162 </ OptionsContainer >
6263 </ MainContainer >
You can’t perform that action at this time.
0 commit comments