diff --git a/src/logic/notifications/notificationBuilder.js b/src/logic/notifications/notificationBuilder.js index fa2f9a85..f528f24f 100644 --- a/src/logic/notifications/notificationBuilder.js +++ b/src/logic/notifications/notificationBuilder.js @@ -1,6 +1,6 @@ // @flow -import { NOTIFICATIONS } from './notificationTypes' import { NOTIFIED_TRANSACTIONS } from '~/logic/safe/transactions' +import { type Notification, NOTIFICATIONS } from './notificationTypes' type NotificationsQueue = { beforeExecution: Notification, @@ -105,9 +105,6 @@ export const getNofiticationsFromTxType = (txType: string) => { let notificationsQueue: NotificationsQueue switch (txType) { - case NOTIFIED_TRANSACTIONS.CONNECT_WALLET_TX: { - break - } case NOTIFIED_TRANSACTIONS.STANDARD_TX: { notificationsQueue = standardTxNotificationsQueue break @@ -136,9 +133,6 @@ export const getNofiticationsFromTxType = (txType: string) => { notificationsQueue = thresholdChangeTxNotificationsQueue break } - case NOTIFIED_TRANSACTIONS.NETWORK_TX: { - break - } default: { notificationsQueue = defaultNotificationsQueue break diff --git a/src/logic/notifications/notificationTypes.js b/src/logic/notifications/notificationTypes.js index fe9686dd..993a01be 100644 --- a/src/logic/notifications/notificationTypes.js +++ b/src/logic/notifications/notificationTypes.js @@ -11,10 +11,12 @@ export type Variant = SUCCESS | ERROR | WARNING | INFO export type Notification = { description: string, - variant: Variant, - persist: boolean, - autoHideDuration?: shortDuration | longDuration, - preventDuplicate: boolean, + options: { + variant: Variant, + persist: boolean, + autoHideDuration?: shortDuration | longDuration, + preventDuplicate: boolean, + }, } export type Notifications = { diff --git a/src/logic/safe/transactions/notifiedTransactions.js b/src/logic/safe/transactions/notifiedTransactions.js index 3e82e522..51d72558 100644 --- a/src/logic/safe/transactions/notifiedTransactions.js +++ b/src/logic/safe/transactions/notifiedTransactions.js @@ -1,7 +1,6 @@ // @flow export type NotifiedTransaction = { - CONNECT_WALLET_TX: string, STANDARD_TX: string, CONFIRMATION_TX: string, CANCELLATION_TX: string, @@ -9,11 +8,9 @@ export type NotifiedTransaction = { SAFE_NAME_CHANGE_TX: string, OWNER_NAME_CHANGE_TX: string, THRESHOLD_CHANGE_TX: string, - NETWORK_TX: string, } export const NOTIFIED_TRANSACTIONS: NotifiedTransaction = { - CONNECT_WALLET_TX: 'CONNECT_WALLET_TX', STANDARD_TX: 'STANDARD_TX', CONFIRMATION_TX: 'CONFIRMATION_TX', CANCELLATION_TX: 'CANCELLATION_TX', @@ -21,5 +18,4 @@ export const NOTIFIED_TRANSACTIONS: NotifiedTransaction = { SAFE_NAME_CHANGE_TX: 'SAFE_NAME_CHANGE_TX', OWNER_NAME_CHANGE_TX: 'OWNER_NAME_CHANGE_TX', THRESHOLD_CHANGE_TX: 'THRESHOLD_CHANGE_TX', - NETWORK_TX: 'NETWORK_TX', } diff --git a/src/routes/safe/store/actions/addTransactions.js b/src/routes/safe/store/actions/addTransactions.js index 50086b5a..f608ffd8 100644 --- a/src/routes/safe/store/actions/addTransactions.js +++ b/src/routes/safe/store/actions/addTransactions.js @@ -2,4 +2,5 @@ import { createAction } from 'redux-actions' export const ADD_TRANSACTIONS = 'ADD_TRANSACTIONS' + export const addTransactions = createAction(ADD_TRANSACTIONS)