Skip to content

Commit

Permalink
Merge pull request #92 from Proof-Of-Humanity/testnets
Browse files Browse the repository at this point in the history
Testnets
  • Loading branch information
martillansky authored Oct 16, 2024
2 parents 810be2f + 185f237 commit ad2c800
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/app/[pohid]/[chain]/[request]/ActionBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,13 @@ export default withClientConnected<ActionBarProps>(function ActionBar({
prepareWithdraw();
}, [address, prepareWithdraw, action, requester, revocation, chain, userChainId]);


const [withdrawDisabled, setWithdrawDisabled] = useState(true);

useEffect(() => {
setWithdrawDisabled(pending || withdrawState.prepare !== "success");
}, [withdrawState.prepare])

const totalCost = BigInt(contractData.baseDeposit) + arbitrationCost;
const statusColor = colorForStatus(status, revocation, expired);

Expand Down Expand Up @@ -332,7 +339,7 @@ export default withClientConnected<ActionBarProps>(function ActionBar({

{requester === address?.toLowerCase() ? (
<button
disabled={pending || withdrawState.prepare !== "success"}
disabled={withdrawDisabled}
className="btn-main mb-2"
onClick={withdraw}
>
Expand All @@ -354,7 +361,7 @@ export default withClientConnected<ActionBarProps>(function ActionBar({
<div className="flex gap-4">
{requester === address?.toLowerCase() ? (
<button
disabled={pending || withdrawState.prepare !== "success"}
disabled={withdrawDisabled}
className="btn-sec mb-2"
onClick={withdraw}
>
Expand Down

0 comments on commit ad2c800

Please sign in to comment.