Skip to content

Commit 6eb5bc6

Browse files
committed
chore: more aggressive draw iterations to account for ineligible jurors
1 parent 168740b commit 6eb5bc6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

web/src/pages/Cases/CaseDetails/MaintenanceButtons/DrawButton.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ const DrawButton: React.FC<IDrawButton> = ({ id, numberOfVotes, setIsOpen, perio
5656
[maintenanceData, isDrawn, phase, period]
5757
);
5858

59+
const drawIterations = useMemo(() => Math.min(100, Number(numberOfVotes ?? 0) * 4), [numberOfVotes]);
60+
5961
const {
6062
data: drawConfig,
6163
isLoading: isLoadingConfig,
@@ -71,7 +73,7 @@ const DrawButton: React.FC<IDrawButton> = ({ id, numberOfVotes, setIsOpen, perio
7173
},
7274
// eslint-disable-next-line
7375
// @ts-ignore
74-
args: [BigInt(id ?? 0), isUniversity ? drawJuror : BigInt(numberOfVotes ?? 0)],
76+
args: [BigInt(id ?? 0), isUniversity ? drawJuror : drawIterations],
7577
});
7678

7779
const { writeContractAsync: draw } = useWriteKlerosCoreDraw();

0 commit comments

Comments
 (0)