diff --git a/src/app/[pohid]/[chain]/[request]/ActionBar.tsx b/src/app/[pohid]/[chain]/[request]/ActionBar.tsx index 5c6857c..e70bd61 100644 --- a/src/app/[pohid]/[chain]/[request]/ActionBar.tsx +++ b/src/app/[pohid]/[chain]/[request]/ActionBar.tsx @@ -103,6 +103,7 @@ export default withClientConnected(function ActionBar({ const errorRef = useRef(false); const offChainRef = useRef(false); const [action, setAction] = useState(ActionType.NONE); + const [canAdvance, setCanAdvance] = useState(true); const [didIVouchFor, setDidIVouchFor] = useState(false); const [isVouchOnchain, setIsVouchOnchain] = useState(false); @@ -205,7 +206,7 @@ export default withClientConnected(function ActionBar({ onFail() { !errorRef.current && toast.error("Advance is not possible"); errorRef.current = true; - //setAction(ActionType.VOUCH); + setCanAdvance(false); }, }), [loading], @@ -240,6 +241,7 @@ export default withClientConnected(function ActionBar({ useEffect(() => { if (action === ActionType.ADVANCE && !revocation) { + setCanAdvance(true); prepareAdvance({ args: [ requester, @@ -267,6 +269,7 @@ export default withClientConnected(function ActionBar({ revocation, chain, userChainId, + canAdvance, ]); useEffect(() => { @@ -405,7 +408,7 @@ export default withClientConnected(function ActionBar({ /> ) : null}