File tree Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Original file line number Diff line number Diff line change 1
1
import { useState , useEffect , useCallback } from "react" ;
2
- import { useBlockNumber , usePublicClient , useReadContract } from "wagmi" ;
2
+ import { usePublicClient , useReadContract } from "wagmi" ;
3
3
import { fromHex , getAbiItem , type Hex } from "viem" ;
4
4
import { MaciVotingAbi } from "../artifacts/MaciVoting.sol" ;
5
5
import { type Action } from "@/utils/types" ;
@@ -28,7 +28,6 @@ export function useProposal(proposalId: string, autoRefresh = false) {
28
28
const publicClient = usePublicClient ( { chainId : PUBLIC_CHAIN . id } ) ;
29
29
const [ proposalCreationEvent , setProposalCreationEvent ] = useState < ProposalCreatedLogResponse [ "args" ] > ( ) ;
30
30
const [ metadataUri , setMetadata ] = useState < string > ( ) ;
31
- const { data : blockNumber } = useBlockNumber ( ) ;
32
31
33
32
// Proposal on-chain data
34
33
const {
@@ -51,12 +50,6 @@ export function useProposal(proposalId: string, autoRefresh = false) {
51
50
} ,
52
51
} ) ;
53
52
54
- /* TODO: replace with refetchInterval
55
- useEffect(() => {
56
- if (autoRefresh) proposalRefetch();
57
- }, [autoRefresh, blockNumber, proposalRefetch]);
58
- */
59
-
60
53
// Creation event
61
54
useEffect ( ( ) => {
62
55
( async ( ) => {
You can’t perform that action at this time.
0 commit comments