move notifications to separate file so processTransaction and createTransaction actions able to use it
This commit is contained in:
parent
816b3c5ab5
commit
3660174530
|
@ -4,3 +4,4 @@ export * from './send'
|
|||
export * from './safeBlockchainOperations'
|
||||
export * from './safeTxSignerEIP712'
|
||||
export * from './txHistory'
|
||||
export * from './notifications'
|
||||
|
|
|
@ -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',
|
||||
}
|
|
@ -36,7 +36,7 @@ const Transactions = ({
|
|||
const hasTransactions = transactions.size > 0
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
<>
|
||||
{hasTransactions ? (
|
||||
<TxsTable
|
||||
transactions={transactions}
|
||||
|
@ -51,7 +51,7 @@ const Transactions = ({
|
|||
) : (
|
||||
<NoTransactions />
|
||||
)}
|
||||
</React.Fragment>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue