Skip to content

Commit 9df6816

Browse files
fix(web): min-stake-check
1 parent c106865 commit 9df6816

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

web/src/pages/Courts/CourtDetails/StakePanel/StakeWithdrawButton.tsx

+4-3
Original file line numberDiff line numberDiff line change
@@ -266,9 +266,10 @@ const StakeWithdrawButton: React.FC<IActionButton> = ({
266266
if (
267267
parsedAmount == 0n ||
268268
(action === ActionType.stake &&
269-
targetStake !== 0n &&
270269
courtDetails &&
271-
targetStake < BigInt(courtDetails?.court?.minStake))
270+
jurorBalance &&
271+
parsedAmount !== 0n &&
272+
jurorBalance[2] + parsedAmount < BigInt(courtDetails?.court?.minStake))
272273
)
273274
return true;
274275
if (isAllowance) {
@@ -284,9 +285,9 @@ const StakeWithdrawButton: React.FC<IActionButton> = ({
284285
setStakeError,
285286
allowanceError,
286287
isAllowance,
287-
targetStake,
288288
action,
289289
courtDetails,
290+
jurorBalance,
290291
]);
291292

292293
const closePopup = () => {

0 commit comments

Comments
 (0)