Skip to content

Commit

Permalink
fix: logic
Browse files Browse the repository at this point in the history
  • Loading branch information
yongenaelf committed Nov 16, 2024
1 parent 41e2c4f commit 26ac5f9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/workspace/use-cli-commands.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import { FormatErrors } from "./format-errors";
import { ShareLink } from "./share-link";
import Link from "next/link";

const PROPOSAL_TIMEOUT = 15 * 60 * 1000; // proposal expires after 15 minutes

export function useCliCommands() {
const terminalContext = useContext(TerminalContext);
const pathname = usePathname();
Expand Down Expand Up @@ -373,16 +375,14 @@ function CheckProposalInfo({ id }: { id: string }) {

const {data, loading} = useProposalsInfo(
[id],
releasedTxId ? 1000 : undefined
releasedTxId ? undefined : 1000
);

useEffect(() => {
const releasedTxId = data?.getNetworkDaoProposalReleasedIndex.data?.[0]?.transactionInfo.transactionId;
setReleasedTxId(releasedTxId);
}, [loading, data]);

const PROPOSAL_TIMEOUT = 15 * 60 * 1000; // proposal expires after 15 minutes

useEffect(() => {
setTimedOut(false);
const timer = setTimeout(() => {
Expand Down

0 comments on commit 26ac5f9

Please sign in to comment.