From dd41a50fd12cb04090cd388d7bb114f82991af66 Mon Sep 17 00:00:00 2001 From: katspaugh Date: Thu, 31 Aug 2023 10:15:39 +0200 Subject: [PATCH] Fix: display submit error separately --- .../tx/SignOrExecuteForm/ExecuteForm.tsx | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/components/tx/SignOrExecuteForm/ExecuteForm.tsx b/src/components/tx/SignOrExecuteForm/ExecuteForm.tsx index de2a133fb8..4c69eb5c92 100644 --- a/src/components/tx/SignOrExecuteForm/ExecuteForm.tsx +++ b/src/components/tx/SignOrExecuteForm/ExecuteForm.tsx @@ -1,5 +1,5 @@ import { type ReactElement, type SyntheticEvent, useContext, useState } from 'react' -import { Button, CardActions, Divider } from '@mui/material' +import { Box, Button, CardActions, Divider } from '@mui/material' import classNames from 'classnames' import ErrorMessage from '@/components/tx/ErrorMessage' @@ -137,17 +137,21 @@ const ExecuteForm = ({ Cannot execute a transaction from the Safe Account itself, please connect a different account. - ) : executionValidationError || gasLimitError ? ( - - This transaction will most likely fail. - {` To save gas costs, ${isCreation ? 'avoid creating' : 'reject'} this transaction.`} - ) : ( - submitError && ( - Error submitting the transaction. Please try again. + (executionValidationError || gasLimitError) && ( + + This transaction will most likely fail. + {` To save gas costs, ${isCreation ? 'avoid creating' : 'reject'} this transaction.`} + ) )} + {submitError && ( + + Error submitting the transaction. Please try again. + + )} +