diff --git a/src/logic/notifications/notificationBuilder.js b/src/logic/notifications/notificationBuilder.js index 85d4dfdb..06d347aa 100644 --- a/src/logic/notifications/notificationBuilder.js +++ b/src/logic/notifications/notificationBuilder.js @@ -8,8 +8,8 @@ import { type Notification, NOTIFICATIONS } from './notificationTypes' type NotificationsQueue = { beforeExecution: Notification, pendingExecution: { - single: Notification, - multiple: Notification, + noMoreConfirmationsNeeded: Notification, + moreConfirmationsNeeded: Notification, }, afterExecution: Notification, afterExecutionError: Notification, @@ -19,8 +19,8 @@ type NotificationsQueue = { const standardTxNotificationsQueue: NotificationsQueue = { beforeExecution: NOTIFICATIONS.SIGN_TX_MSG, pendingExecution: { - single: NOTIFICATIONS.TX_PENDING_MSG, - multiple: NOTIFICATIONS.TX_PENDING_MORE_CONFIRMATIONS_MSG, + noMoreConfirmationsNeeded: NOTIFICATIONS.TX_PENDING_MSG, + moreConfirmationsNeeded: NOTIFICATIONS.TX_PENDING_MORE_CONFIRMATIONS_MSG, }, afterRejection: NOTIFICATIONS.TX_REJECTED_MSG, afterExecution: NOTIFICATIONS.TX_EXECUTED_MSG, @@ -30,8 +30,8 @@ const standardTxNotificationsQueue: NotificationsQueue = { const confirmationTxNotificationsQueue: NotificationsQueue = { beforeExecution: NOTIFICATIONS.SIGN_TX_MSG, pendingExecution: { - single: NOTIFICATIONS.TX_CONFIRMATION_PENDING_MSG, - multiple: null, + noMoreConfirmationsNeeded: NOTIFICATIONS.TX_CONFIRMATION_PENDING_MSG, + moreConfirmationsNeeded: null, }, afterRejection: NOTIFICATIONS.TX_REJECTED_MSG, afterExecution: NOTIFICATIONS.TX_CONFIRMATION_EXECUTED_MSG, @@ -41,8 +41,8 @@ const confirmationTxNotificationsQueue: NotificationsQueue = { const cancellationTxNotificationsQueue: NotificationsQueue = { beforeExecution: NOTIFICATIONS.SIGN_TX_MSG, pendingExecution: { - single: NOTIFICATIONS.TX_PENDING_MSG, - multiple: NOTIFICATIONS.TX_PENDING_MORE_CONFIRMATIONS_MSG, + noMoreConfirmationsNeeded: NOTIFICATIONS.TX_PENDING_MSG, + moreConfirmationsNeeded: NOTIFICATIONS.TX_PENDING_MORE_CONFIRMATIONS_MSG, }, afterRejection: NOTIFICATIONS.TX_REJECTED_MSG, afterExecution: NOTIFICATIONS.TX_EXECUTED_MSG, @@ -52,8 +52,8 @@ const cancellationTxNotificationsQueue: NotificationsQueue = { const ownerChangeTxNotificationsQueue: NotificationsQueue = { beforeExecution: NOTIFICATIONS.SIGN_OWNER_CHANGE_MSG, pendingExecution: { - single: NOTIFICATIONS.ONWER_CHANGE_PENDING_MSG, - multiple: NOTIFICATIONS.ONWER_CHANGE_PENDING_MORE_CONFIRMATIONS_MSG, + noMoreConfirmationsNeeded: NOTIFICATIONS.ONWER_CHANGE_PENDING_MSG, + moreConfirmationsNeeded: NOTIFICATIONS.ONWER_CHANGE_PENDING_MORE_CONFIRMATIONS_MSG, }, afterRejection: NOTIFICATIONS.ONWER_CHANGE_REJECTED_MSG, afterExecution: NOTIFICATIONS.OWNER_CHANGE_EXECUTED_MSG, @@ -63,8 +63,8 @@ const ownerChangeTxNotificationsQueue: NotificationsQueue = { const safeNameChangeNotificationsQueue: NotificationsQueue = { beforeExecution: null, pendingExecution: { - single: null, - multiple: null, + noMoreConfirmationsNeeded: null, + moreConfirmationsNeeded: null, }, afterRejection: null, afterExecution: NOTIFICATIONS.SAFE_NAME_CHANGE_EXECUTED_MSG, @@ -74,8 +74,8 @@ const safeNameChangeNotificationsQueue: NotificationsQueue = { const ownerNameChangeNotificationsQueue: NotificationsQueue = { beforeExecution: null, pendingExecution: { - single: null, - multiple: null, + noMoreConfirmationsNeeded: null, + moreConfirmationsNeeded: null, }, afterRejection: null, afterExecution: NOTIFICATIONS.OWNER_NAME_CHANGE_EXECUTED_MSG, @@ -85,8 +85,8 @@ const ownerNameChangeNotificationsQueue: NotificationsQueue = { const thresholdChangeTxNotificationsQueue: NotificationsQueue = { beforeExecution: NOTIFICATIONS.SIGN_THRESHOLD_CHANGE_MSG, pendingExecution: { - single: NOTIFICATIONS.THRESHOLD_CHANGE_PENDING_MSG, - multiple: NOTIFICATIONS.THRESHOLD_CHANGE_PENDING_MORE_CONFIRMATIONS_MSG, + noMoreConfirmationsNeeded: NOTIFICATIONS.THRESHOLD_CHANGE_PENDING_MSG, + moreConfirmationsNeeded: NOTIFICATIONS.THRESHOLD_CHANGE_PENDING_MORE_CONFIRMATIONS_MSG, }, afterRejection: NOTIFICATIONS.THRESHOLD_CHANGE_REJECTED_MSG, afterExecution: NOTIFICATIONS.THRESHOLD_CHANGE_EXECUTED_MSG, @@ -96,8 +96,8 @@ const thresholdChangeTxNotificationsQueue: NotificationsQueue = { const defaultNotificationsQueue: NotificationsQueue = { beforeExecution: NOTIFICATIONS.SIGN_TX_MSG, pendingExecution: { - single: NOTIFICATIONS.TX_PENDING_MSG, - multiple: NOTIFICATIONS.TX_PENDING_MORE_CONFIRMATIONS_MSG, + noMoreConfirmationsNeeded: NOTIFICATIONS.TX_PENDING_MSG, + moreConfirmationsNeeded: NOTIFICATIONS.TX_PENDING_MORE_CONFIRMATIONS_MSG, }, afterRejection: NOTIFICATIONS.TX_REJECTED_MSG, afterExecution: NOTIFICATIONS.TX_EXECUTED_MSG, diff --git a/src/routes/safe/store/actions/createTransaction.js b/src/routes/safe/store/actions/createTransaction.js index de5eee45..4478bd8a 100644 --- a/src/routes/safe/store/actions/createTransaction.js +++ b/src/routes/safe/store/actions/createTransaction.js @@ -71,11 +71,12 @@ const createTransaction = ( .once('transactionHash', (hash) => { txHash = hash closeSnackbar(beforeExecutionKey) - const pendingExecutionNotification: Notification = { - message: isExecution - ? notificationsQueue.pendingExecution.single.message - : notificationsQueue.pendingExecution.multiple.message, - options: notificationsQueue.pendingExecution.single.options, + const pendingExecutionNotification: Notification = isExecution ? { + message: notificationsQueue.pendingExecution.noMoreConfirmationsNeeded.message, + options: notificationsQueue.pendingExecution.noMoreConfirmationsNeeded.options, + } : { + message: notificationsQueue.pendingExecution.moreConfirmationsNeeded.message, + options: notificationsQueue.pendingExecution.moreConfirmationsNeeded.options, } pendingExecutionKey = showSnackbar(pendingExecutionNotification, enqueueSnackbar, closeSnackbar) }) diff --git a/src/routes/safe/store/actions/processTransaction.js b/src/routes/safe/store/actions/processTransaction.js index 0e481946..d2ea959d 100644 --- a/src/routes/safe/store/actions/processTransaction.js +++ b/src/routes/safe/store/actions/processTransaction.js @@ -102,8 +102,8 @@ const processTransaction = ( txHash = hash closeSnackbar(beforeExecutionKey) const notification: Notification = { - message: notificationsQueue.pendingExecution.single.message, - options: notificationsQueue.pendingExecution.single.options, + message: notificationsQueue.pendingExecution.noMoreConfirmationsNeeded.message, + options: notificationsQueue.pendingExecution.noMoreConfirmationsNeeded.options, } pendingExecutionKey = showSnackbar(notification, enqueueSnackbar, closeSnackbar) })