Skip to content

Commit

Permalink
feat: timeout after proposal expires
Browse files Browse the repository at this point in the history
  • Loading branch information
yongenaelf committed Nov 16, 2024
1 parent 335adb4 commit 5756d91
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/workspace/use-cli-commands.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -381,11 +381,13 @@ function CheckProposalInfo({ id }: { id: string }) {
setReleasedTxId(releasedTxId);
}, [loading]);

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

useEffect(() => {
setTimedOut(false);
const timer = setTimeout(() => {
setTimedOut(true);
}, 120000);
}, PROPOSAL_TIMEOUT);
return () => clearTimeout(timer);
}, [id])

Expand Down

0 comments on commit 5756d91

Please sign in to comment.