Merge branch 'bug/execute-tx-XooY' into development
This commit is contained in:
commit
2a37166d4f
|
@ -64,10 +64,10 @@ const ApproveTxModal = ({
|
||||||
enqueueSnackbar,
|
enqueueSnackbar,
|
||||||
closeSnackbar,
|
closeSnackbar,
|
||||||
}: Props) => {
|
}: Props) => {
|
||||||
const [approveAndExecute, setApproveAndExecute] = useState<boolean>(true)
|
const oneConfirmationLeft = !thresholdReached && tx.confirmations.size + 1 === threshold
|
||||||
|
const [approveAndExecute, setApproveAndExecute] = useState<boolean>(oneConfirmationLeft || thresholdReached)
|
||||||
const [gasCosts, setGasCosts] = useState<string>('< 0.001')
|
const [gasCosts, setGasCosts] = useState<string>('< 0.001')
|
||||||
const { title, description } = getModalTitleAndDescription(thresholdReached)
|
const { title, description } = getModalTitleAndDescription(thresholdReached)
|
||||||
const oneConfirmationLeft = tx.confirmations.size + 1 === threshold
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
let isCurrent = true
|
let isCurrent = true
|
||||||
|
@ -107,7 +107,7 @@ const ApproveTxModal = ({
|
||||||
TX_NOTIFICATION_TYPES.CONFIRMATION_TX,
|
TX_NOTIFICATION_TYPES.CONFIRMATION_TX,
|
||||||
enqueueSnackbar,
|
enqueueSnackbar,
|
||||||
closeSnackbar,
|
closeSnackbar,
|
||||||
approveAndExecute,
|
approveAndExecute && oneConfirmationLeft,
|
||||||
)
|
)
|
||||||
onClose()
|
onClose()
|
||||||
}
|
}
|
||||||
|
@ -131,7 +131,7 @@ const ApproveTxModal = ({
|
||||||
<br />
|
<br />
|
||||||
<Bold className={classes.nonceNumber}>{tx.nonce}</Bold>
|
<Bold className={classes.nonceNumber}>{tx.nonce}</Bold>
|
||||||
</Paragraph>
|
</Paragraph>
|
||||||
{!thresholdReached && oneConfirmationLeft && (
|
{oneConfirmationLeft && (
|
||||||
<>
|
<>
|
||||||
<Paragraph color="error">
|
<Paragraph color="error">
|
||||||
Approving this transaction executes it right away. If you want approve but execute the transaction
|
Approving this transaction executes it right away. If you want approve but execute the transaction
|
||||||
|
|
Loading…
Reference in New Issue