diff --git a/src/logic/safe/transactions/index.js b/src/logic/safe/transactions/index.js index a085a125..056e5633 100644 --- a/src/logic/safe/transactions/index.js +++ b/src/logic/safe/transactions/index.js @@ -4,3 +4,4 @@ export * from './send' export * from './safeBlockchainOperations' export * from './safeTxSignerEIP712' export * from './txHistory' +export * from './notifications' diff --git a/src/logic/safe/transactions/notifications.js b/src/logic/safe/transactions/notifications.js new file mode 100644 index 00000000..65bdf16e --- /dev/null +++ b/src/logic/safe/transactions/notifications.js @@ -0,0 +1,14 @@ +// @flow +export type Notifications = { + BEFORE_EXECUTION_OR_CREATION: string, + AFTER_EXECUTION: string, + CREATED_MORE_CONFIRMATIONS_NEEDED: string, + ERROR: string, +} + +export const DEFAULT_NOTIFICATIONS: Notifications = { + BEFORE_EXECUTION_OR_CREATION: 'Transaction in progress', + AFTER_EXECUTION: 'Transaction successfully executed', + CREATED_MORE_CONFIRMATIONS_NEEDED: 'Transaction in progress: More confirmations required to execute', + ERROR: 'Transaction failed', +} diff --git a/src/routes/safe/components/Transactions/index.jsx b/src/routes/safe/components/Transactions/index.jsx index c8677ccd..7a32b5b5 100644 --- a/src/routes/safe/components/Transactions/index.jsx +++ b/src/routes/safe/components/Transactions/index.jsx @@ -36,7 +36,7 @@ const Transactions = ({ const hasTransactions = transactions.size > 0 return ( - + <> {hasTransactions ? ( )} - + ) } diff --git a/src/routes/safe/store/actions/createTransaction.js b/src/routes/safe/store/actions/createTransaction.js index 03982ea7..4d9359c5 100644 --- a/src/routes/safe/store/actions/createTransaction.js +++ b/src/routes/safe/store/actions/createTransaction.js @@ -5,21 +5,13 @@ import { userAccountSelector } from '~/logic/wallets/store/selectors' import fetchTransactions from '~/routes/safe/store/actions/fetchTransactions' import { type GlobalState } from '~/store' import { getGnosisSafeInstanceAt } from '~/logic/contracts/safeContracts' -import { approveTransaction, executeTransaction, CALL } from '~/logic/safe/transactions' - -export type Notifications = { - BEFORE_EXECUTION_OR_CREATION: string, - AFTER_EXECUTION: string, - CREATED_MORE_CONFIRMATIONS_NEEDED: string, - ERROR: string, -} - -const DEFAULT_NOTIFICATIONS: Notifications = { - BEFORE_EXECUTION_OR_CREATION: 'Transaction in progress', - AFTER_EXECUTION: 'Transaction successfully executed', - CREATED_MORE_CONFIRMATIONS_NEEDED: 'Transaction in progress: More confirmations required to execute', - ERROR: 'Transaction failed', -} +import { + approveTransaction, + executeTransaction, + CALL, + type Notifications, + DEFAULT_NOTIFICATIONS, +} from '~/logic/safe/transactions' const createTransaction = ( safeAddress: string,