Avoids changing the transaction fee message while loading the estimation

This commit is contained in:
Agustín Longoni 2021-02-01 19:20:15 -03:00
parent 4bf1a74b33
commit 42821c11d2
2 changed files with 15 additions and 10 deletions

View File

@ -21,6 +21,9 @@ export const TransactionFees = ({
txEstimationExecutionStatus,
}: TransactionFailTextProps): React.ReactElement | null => {
let transactionAction
if (txEstimationExecutionStatus === EstimationStatus.LOADING) {
return null
}
if (isCreation) {
transactionAction = 'create'
} else if (isExecution) {

View File

@ -216,16 +216,18 @@ export const ReviewRemoveOwnerModal = ({
isTransactionExecution={isExecution}
/>
<Block className={classes.gasCostsContainer}>
<TransactionFees
gasCostFormatted={gasCostFormatted}
isExecution={isExecution}
isCreation={isCreation}
isOffChainSignature={isOffChainSignature}
txEstimationExecutionStatus={txEstimationExecutionStatus}
/>
</Block>
<Hairline />
{txEstimationExecutionStatus === EstimationStatus.LOADING ? null : (
<Block className={classes.gasCostsContainer}>
<TransactionFees
gasCostFormatted={gasCostFormatted}
isExecution={isExecution}
isCreation={isCreation}
isOffChainSignature={isOffChainSignature}
txEstimationExecutionStatus={txEstimationExecutionStatus}
/>
<Hairline />
</Block>
)}
<Row align="center" className={classes.buttonRow}>
<Button minHeight={42} minWidth={140} onClick={onClickBack}>
Back