diff --git a/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/ApproveTxModal/index.jsx b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/ApproveTxModal/index.jsx index a8dadc3f..55414fda 100644 --- a/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/ApproveTxModal/index.jsx +++ b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/ApproveTxModal/index.jsx @@ -64,10 +64,10 @@ const ApproveTxModal = ({ enqueueSnackbar, closeSnackbar, }: Props) => { - const [approveAndExecute, setApproveAndExecute] = useState(true) + const oneConfirmationLeft = !thresholdReached && tx.confirmations.size + 1 === threshold + const [approveAndExecute, setApproveAndExecute] = useState(oneConfirmationLeft || thresholdReached) const [gasCosts, setGasCosts] = useState('< 0.001') const { title, description } = getModalTitleAndDescription(thresholdReached) - const oneConfirmationLeft = tx.confirmations.size + 1 === threshold useEffect(() => { let isCurrent = true @@ -107,7 +107,7 @@ const ApproveTxModal = ({ TX_NOTIFICATION_TYPES.CONFIRMATION_TX, enqueueSnackbar, closeSnackbar, - approveAndExecute, + approveAndExecute && oneConfirmationLeft, ) onClose() } @@ -131,7 +131,7 @@ const ApproveTxModal = ({
{tx.nonce} - {!thresholdReached && oneConfirmationLeft && ( + {oneConfirmationLeft && ( <> Approving this transaction executes it right away. If you want approve but execute the transaction