Skip to content

Commit

Permalink
Merge pull request #449 from kleros/fix/delay-refuse-to-arbitrate
Browse files Browse the repository at this point in the history
Fix: delay refuse to arbitrate
  • Loading branch information
alcercu authored Dec 11, 2024
2 parents cef9bd1 + a6f438a commit adc509c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,5 +105,6 @@
"volta": {
"node": "16.20.2",
"yarn": "1.22.10"
}
},
"packageManager": "yarn@1.22.22"
}
10 changes: 9 additions & 1 deletion src/components/case-details-card.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,14 @@ export default function CaseDetailsCard({ ID }) {
const metaEvidence = dispute && getMetaEvidence(chainId, dispute.arbitrated, KlerosLiquid.address, ID);
const evidence = useEvidence(chainId, ID);

const [showRefuse, setShowRefuse] = useState(false);
useEffect(() => {
const timer = setTimeout(() => {
setShowRefuse(true);
}, 180000);
return () => clearTimeout(timer);
}, []);

const { send: sendCommit, status: sendCommitStatus } = useCacheSend("KlerosLiquid", "castCommit");
const { send: sendVote, status: sendVoteStatus } = useCacheSend("KlerosLiquid", "castVote");
const onJustificationChange = useCallback(({ currentTarget: { value } }) => setJustification(value), []);
Expand Down Expand Up @@ -763,7 +771,7 @@ export default function CaseDetailsCard({ ID }) {
)}
</div>
)}
{dispute && Number(dispute.period) < "3" && !votesData.voted && (
{showRefuse && dispute && Number(dispute.period) < "3" && !votesData.voted && (
<>
<div style={{ marginTop: "32px" }}>
If the dispute is failing to load and appears to be broken it is advised to refuse to arbitrate. Please cast
Expand Down

0 comments on commit adc509c

Please sign in to comment.