Remove unused notified transaction messages

This commit is contained in:
Germán Martínez 2019-09-25 14:51:36 +02:00
parent 64ba0aa917
commit 14b148afa6
4 changed files with 8 additions and 15 deletions

View File

@ -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

View File

@ -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 = {

View File

@ -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',
}

View File

@ -2,4 +2,5 @@
import { createAction } from 'redux-actions'
export const ADD_TRANSACTIONS = 'ADD_TRANSACTIONS'
export const addTransactions = createAction<string, *>(ADD_TRANSACTIONS)