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 b33e343b..3d76a766 100644 --- a/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/ApproveTxModal/index.jsx +++ b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/ApproveTxModal/index.jsx @@ -13,7 +13,7 @@ import Row from '~/components/layout/Row' import Bold from '~/components/layout/Bold' import Block from '~/components/layout/Block' import Paragraph from '~/components/layout/Paragraph' -import { type Variant } from '~/components/Header' +import { NOTIFIED_TRANSACTIONS } from '~/logic/safe/transactions' import { type Transaction } from '~/routes/safe/store/models/transaction' import { styles } from './style' @@ -30,7 +30,8 @@ type Props = { threshold: number, thresholdReached: boolean, userAddress: string, - enqueueSnackbar: (message: string, variant: Variant) => void, + enqueueSnackbar: Function, + closeSnackbar: Function, } const getModalTitleAndDescription = (thresholdReached: boolean) => { @@ -58,6 +59,7 @@ const ApproveTxModal = ({ thresholdReached, userAddress, enqueueSnackbar, + closeSnackbar, }: Props) => { const [approveAndExecute, setApproveAndExecute] = useState(false) const { title, description } = getModalTitleAndDescription(thresholdReached) @@ -66,7 +68,14 @@ const ApproveTxModal = ({ const handleExecuteCheckbox = () => setApproveAndExecute((prevApproveAndExecute) => !prevApproveAndExecute) const approveTx = () => { - processTransaction(safeAddress, tx, enqueueSnackbar, userAddress, enqueueSnackbar) + processTransaction( + safeAddress, + tx, + userAddress, + NOTIFIED_TRANSACTIONS.CONFIRMATION_TX, + enqueueSnackbar, + closeSnackbar, + ) onClose() } diff --git a/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/CancelTxModal/index.jsx b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/CancelTxModal/index.jsx index 124c424a..abec6e5d 100644 --- a/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/CancelTxModal/index.jsx +++ b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/CancelTxModal/index.jsx @@ -13,7 +13,7 @@ import Block from '~/components/layout/Block' import Paragraph from '~/components/layout/Paragraph' import { type Transaction } from '~/routes/safe/store/models/transaction' import { EMPTY_DATA } from '~/logic/wallets/ethTransactions' -import { type Variant } from '~/components/Header' +import { NOTIFIED_TRANSACTIONS } from '~/logic/safe/transactions' import { styles } from './style' type Props = { @@ -23,14 +23,30 @@ type Props = { createTransaction: Function, tx: Transaction, safeAddress: string, - enqueueSnackbar: (message: string, variant: Variant) => void, + enqueueSnackbar: Function, + closeSnackbar: Function, } const CancelTxModal = ({ - onClose, isOpen, classes, createTransaction, tx, safeAddress, enqueueSnackbar, + onClose, + isOpen, + classes, + createTransaction, + tx, + safeAddress, + enqueueSnackbar, + closeSnackbar, }: Props) => { const sendReplacementTransaction = () => { - createTransaction(safeAddress, safeAddress, 0, EMPTY_DATA, enqueueSnackbar) + createTransaction( + safeAddress, + safeAddress, + 0, + EMPTY_DATA, + NOTIFIED_TRANSACTIONS.CANCELLATION_TX, + enqueueSnackbar, + closeSnackbar, + ) onClose() }