diff --git a/plugins/lockToVote/hooks/useProposalVeto.tsx b/plugins/lockToVote/hooks/useProposalVeto.tsx index 4156a695..27df6d4e 100644 --- a/plugins/lockToVote/hooks/useProposalVeto.tsx +++ b/plugins/lockToVote/hooks/useProposalVeto.tsx @@ -5,11 +5,12 @@ import { useWriteContract, } from "wagmi"; import { useProposal } from "./useProposal"; -import { useProposalVetoes } from "@/plugins/dualGovernance/hooks/useProposalVetoes"; -import { useUserCanVeto } from "@/plugins/dualGovernance/hooks/useUserCanVeto"; -import { OptimisticTokenVotingPluginAbi } from "@/plugins/dualGovernance/artifacts/OptimisticTokenVotingPlugin.sol"; +import { useProposalVetoes } from "@/plugins/lockToVote/hooks/useProposalVetoes"; +import { useUserCanVeto } from "@/plugins/lockToVote/hooks/useUserCanVeto"; +import { OptimisticTokenVotingPluginAbi } from "@/plugins/lockToVote/artifacts/OptimisticTokenVotingPlugin.sol"; import { useAlertContext, AlertContextProps } from "@/context/AlertContext"; import { PUB_CHAIN, PUB_LOCK_TO_VOTE_PLUGIN_ADDRESS } from "@/constants"; +import { LockToVetoPluginAbi } from "../artifacts/LockToVetoPlugin.sol"; export function useProposalVeto(proposalId: string) { const publicClient = usePublicClient({ chainId: PUB_CHAIN.id }); @@ -39,10 +40,6 @@ export function useProposalVeto(proposalId: string) { BigInt(proposalId) ); - useEffect(() => { - console.log(canVeto); - }, [canVeto]); - useEffect(() => { if (vetoingStatus === "idle" || vetoingStatus === "pending") return; else if (vetoingStatus === "error") { @@ -51,7 +48,7 @@ export function useProposalVeto(proposalId: string) { timeout: 4 * 1000, }); } else { - addAlert("Could not create the proposal", { type: "error" }); + addAlert("Could not create the veto", { type: "error" }); } return; } @@ -77,10 +74,10 @@ export function useProposalVeto(proposalId: string) { const vetoProposal = () => { vetoWrite({ - abi: OptimisticTokenVotingPluginAbi, + abi: LockToVetoPluginAbi, address: PUB_LOCK_TO_VOTE_PLUGIN_ADDRESS, functionName: "veto", - args: [proposalId], + args: [proposalId, 50000000000000000000], }); }; diff --git a/plugins/lockToVote/hooks/useUserCanVeto.tsx b/plugins/lockToVote/hooks/useUserCanVeto.tsx index a07f11dd..415706eb 100644 --- a/plugins/lockToVote/hooks/useUserCanVeto.tsx +++ b/plugins/lockToVote/hooks/useUserCanVeto.tsx @@ -1,7 +1,7 @@ import { useAccount, useBlockNumber, useReadContract } from "wagmi"; -import { OptimisticTokenVotingPluginAbi } from "@/plugins/lockToVote/artifacts/OptimisticTokenVotingPlugin.sol"; import { useEffect } from "react"; import { PUB_CHAIN, PUB_LOCK_TO_VOTE_PLUGIN_ADDRESS } from "@/constants"; +import { LockToVetoPluginAbi } from "../artifacts/LockToVetoPlugin.sol"; export function useUserCanVeto(proposalId: bigint) { const { address } = useAccount(); @@ -10,7 +10,7 @@ export function useUserCanVeto(proposalId: bigint) { const { data: canVeto, refetch } = useReadContract({ chainId: PUB_CHAIN.id, address: PUB_LOCK_TO_VOTE_PLUGIN_ADDRESS, - abi: OptimisticTokenVotingPluginAbi, + abi: LockToVetoPluginAbi, functionName: "canVeto", args: [proposalId, address], });