diff --git a/src/routes/safe/components/Layout.jsx b/src/routes/safe/components/Layout.jsx index 52be6e15..5e4ada9f 100644 --- a/src/routes/safe/components/Layout.jsx +++ b/src/routes/safe/components/Layout.jsx @@ -18,8 +18,9 @@ import { sm, xs, secondary, smallFontSize, border, secondaryText, } from '~/theme/variables' import { copyToClipboard } from '~/utils/clipboard' +import { type Actions } from '../container/actions' import Balances from './Balances' -import Transactions from './TransactionsNew' +import Transactions from './Transactions' import Settings from './Settings' export const BALANCES_TAB_BTN_TEST_ID = 'balances-tab-btn' @@ -31,13 +32,9 @@ type State = { tabIndex: number, } -type Props = SelectorProps & { +type Props = SelectorProps & Actions & { classes: Object, granted: boolean, - updateSafe: Function, - createTransaction: Function, - processTransaction: Function, - fetchTransactions: Function, } const openIconStyle = { diff --git a/src/routes/safe/components/Transactions/Collapsed/Confirmations.jsx b/src/routes/safe/components/Transactions/Collapsed/Confirmations.jsx deleted file mode 100644 index 04a02ab1..00000000 --- a/src/routes/safe/components/Transactions/Collapsed/Confirmations.jsx +++ /dev/null @@ -1,83 +0,0 @@ -// @flow -import * as React from 'react' -import openHoc, { type Open } from '~/components/hoc/OpenHoc' -import { withStyles } from '@material-ui/core/styles' -import Collapse from '@material-ui/core/Collapse' -import IconButton from '@material-ui/core/IconButton' -import ListItemText from '~/components/List/ListItemText' -import List from '@material-ui/core/List' -import ListItem from '@material-ui/core/ListItem' -import ListItemIcon from '@material-ui/core/ListItemIcon' -import Avatar from '@material-ui/core/Avatar' -import Group from '@material-ui/icons/Group' -import Person from '@material-ui/icons/Person' -import ExpandLess from '@material-ui/icons/ExpandLess' -import ExpandMore from '@material-ui/icons/ExpandMore' -import { type WithStyles } from '~/theme/mui' -import { type Confirmation, type ConfirmationProps } from '~/routes/safe/store/models/confirmation' - -const styles = { - nested: { - paddingLeft: '40px', - }, -} - -type Props = Open & WithStyles & { - confirmations: List, - threshold: number, -} - -const GnoConfirmation = ({ owner, type, hash }: ConfirmationProps) => { - const address = owner.get('address') - const confirmed = type === 'confirmation' - const text = confirmed ? 'Confirmed' : 'Not confirmed' - const hashText = confirmed ? `Confirmation hash: ${hash}` : undefined - - return ( - - - - - - - - - ) -} - -const Confirmaitons = openHoc(({ - open, toggle, confirmations, threshold, -}: Props) => ( - - - - - - - - {open - ? - : - } - - - - - {confirmations.map(confirmation => ( - - ))} - - - -)) - -export default withStyles(styles)(Confirmaitons) diff --git a/src/routes/safe/components/Transactions/Collapsed/index.jsx b/src/routes/safe/components/Transactions/Collapsed/index.jsx deleted file mode 100644 index 1a94be9c..00000000 --- a/src/routes/safe/components/Transactions/Collapsed/index.jsx +++ /dev/null @@ -1,52 +0,0 @@ -// @flow -import * as React from 'react' -import { List as ImmutableList } from 'immutable' -import Row from '~/components/layout/Row' -import Col from '~/components/layout/Col' -import List from '@material-ui/core/List' -import ListItem from '@material-ui/core/ListItem' -import ListItemText from '~/components/List/ListItemText' -import Avatar from '@material-ui/core/Avatar' -import Group from '@material-ui/icons/Group' -import MailOutline from '@material-ui/icons/MailOutline' -import { type Confirmation } from '~/routes/safe/store/models/confirmation' -import Confirmations from './Confirmations' - -type Props = { - safeName: string, - confirmations: ImmutableList, - destination: string, - threshold: number, -} - -const listStyle = { - width: '100%', -} - -class Collapsed extends React.PureComponent { - render() { - const { - confirmations, destination, safeName, threshold, - } = this.props - - return ( - - - - - - - - - - - - - - - - ) - } -} - -export default Collapsed diff --git a/src/routes/safe/components/Transactions/NoTransactions/index.jsx b/src/routes/safe/components/Transactions/NoTransactions/index.jsx index f6e99d08..a2ed8291 100644 --- a/src/routes/safe/components/Transactions/NoTransactions/index.jsx +++ b/src/routes/safe/components/Transactions/NoTransactions/index.jsx @@ -5,8 +5,10 @@ import Col from '~/components/layout/Col' import Row from '~/components/layout/Row' import Paragraph from '~/components/layout/Paragraph/index' -const NoRights = () => ( - +export const NO_TRANSACTION_ROW_TEST_ID = 'no-transaction-row' + +const NoTransactions = () => ( + No transactions found for this safe @@ -15,4 +17,4 @@ const NoRights = () => ( ) -export default NoRights +export default NoTransactions diff --git a/src/routes/safe/components/Transactions/Transaction/index.jsx b/src/routes/safe/components/Transactions/Transaction/index.jsx deleted file mode 100644 index b455e43f..00000000 --- a/src/routes/safe/components/Transactions/Transaction/index.jsx +++ /dev/null @@ -1,131 +0,0 @@ -// @flow -import * as React from 'react' -import { List } from 'immutable' -import { connect } from 'react-redux' -import openHoc, { type Open } from '~/components/hoc/OpenHoc' -import ExpandLess from '@material-ui/icons/ExpandLess' -import ExpandMore from '@material-ui/icons/ExpandMore' -import IconButton from '@material-ui/core/IconButton' -import ListItemText from '~/components/List/ListItemText' -import Row from '~/components/layout/Row' -import ListItem from '@material-ui/core/ListItem' -import ListItemIcon from '@material-ui/core/ListItemIcon' -import Avatar from '@material-ui/core/Avatar' -import AttachMoney from '@material-ui/icons/AttachMoney' -import Atm from '@material-ui/icons/LocalAtm' -import DoneAll from '@material-ui/icons/DoneAll' -import CompareArrows from '@material-ui/icons/CompareArrows' -import Collapsed from '~/routes/safe/components/Transactions/Collapsed' -import { type Transaction } from '~/routes/safe/store/models/transaction' -import Hairline from '~/components/layout/Hairline/index' -import Button from '~/components/layout/Button' -import { sameAddress } from '~/logic/wallets/ethAddresses' -import { type Confirmation } from '~/routes/safe/store/models/confirmation' -import selector, { type SelectorProps } from './selector' - -type Props = Open & - SelectorProps & { - transaction: Transaction, - safeName: string, - threshold: number, - onProcessTx: (tx: Transaction, alreadyConfirmed: number) => void, - } - -export const PROCESS_TXS = 'PROCESS TRANSACTION' - -class GnoTransaction extends React.PureComponent { - onProccesClick = () => { - const { onProcessTx, transaction, confirmed } = this.props - - onProcessTx(transaction, confirmed) - } - - hasConfirmed = (userAddress: string, confirmations: List): boolean => ( - confirmations - .filter( - (conf: Confirmation) => ( - sameAddress(userAddress, conf.get('owner').get('address')) && conf.get('type') === 'confirmation' - ), - ) - .count() > 0 - ) - - render() { - const { - open, toggle, transaction, confirmed, safeName, userAddress, executionHash, threshold, - } = this.props - - const confirmationText = executionHash - ? 'Already executed' - : `${confirmed} of the ${threshold} confirmations needed` - const userConfirmed = this.hasConfirmed(userAddress, transaction.get('confirmations')) - - return ( - - - - - - - - - - - - - - - - - {open ? ( - - - - ) : ( - - - - )} - - - - - - {executionHash && ( - - - - - - - )} - {!executionHash && userConfirmed && ( - - - - - - - )} - {!executionHash && !userConfirmed && ( - - )} - - - {open && ( - - )} - - - ) - } -} - -export default openHoc(connect(selector)(GnoTransaction)) diff --git a/src/routes/safe/components/Transactions/Transaction/selector.js b/src/routes/safe/components/Transactions/Transaction/selector.js deleted file mode 100644 index d2bcab74..00000000 --- a/src/routes/safe/components/Transactions/Transaction/selector.js +++ /dev/null @@ -1,34 +0,0 @@ -// @flow -import { createStructuredSelector } from 'reselect' -import { confirmationsTransactionSelector } from '~/routes/safe/store/selectors/index' -import { userAccountSelector } from '~/logic/wallets/store/selectors' -import { type Transaction } from '~/routes/safe/store/models/transaction' -import { type GlobalState } from '~/store' -import { type Confirmation } from '~/routes/safe/store/models/confirmation' - -export type SelectorProps = { - confirmed: typeof confirmationsTransactionSelector, - userAddress: typeof userAccountSelector, - executionHash: string, -} - -type TxProps = { - transaction: Transaction, -} - -const transactionHashSector = (state: GlobalState, props: TxProps) => { - if (!props.transaction) { - return undefined - } - - const confirmations = props.transaction.get('confirmations') - const executedConf = confirmations.find((conf: Confirmation) => conf.get('type') === 'execution') - - return executedConf ? executedConf.get('hash') : undefined -} - -export default createStructuredSelector({ - executionHash: transactionHashSector, - confirmed: confirmationsTransactionSelector, - userAddress: userAccountSelector, -}) diff --git a/src/routes/safe/components/TransactionsNew/TxsTable/ExpandedTx/ApproveTxModal/index.jsx b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/ApproveTxModal/index.jsx similarity index 100% rename from src/routes/safe/components/TransactionsNew/TxsTable/ExpandedTx/ApproveTxModal/index.jsx rename to src/routes/safe/components/Transactions/TxsTable/ExpandedTx/ApproveTxModal/index.jsx diff --git a/src/routes/safe/components/TransactionsNew/TxsTable/ExpandedTx/ApproveTxModal/style.js b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/ApproveTxModal/style.js similarity index 100% rename from src/routes/safe/components/TransactionsNew/TxsTable/ExpandedTx/ApproveTxModal/style.js rename to src/routes/safe/components/Transactions/TxsTable/ExpandedTx/ApproveTxModal/style.js diff --git a/src/routes/safe/components/TransactionsNew/TxsTable/ExpandedTx/CancelTxModal/index.jsx b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/CancelTxModal/index.jsx similarity index 100% rename from src/routes/safe/components/TransactionsNew/TxsTable/ExpandedTx/CancelTxModal/index.jsx rename to src/routes/safe/components/Transactions/TxsTable/ExpandedTx/CancelTxModal/index.jsx diff --git a/src/routes/safe/components/TransactionsNew/TxsTable/ExpandedTx/CancelTxModal/style.js b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/CancelTxModal/style.js similarity index 100% rename from src/routes/safe/components/TransactionsNew/TxsTable/ExpandedTx/CancelTxModal/style.js rename to src/routes/safe/components/Transactions/TxsTable/ExpandedTx/CancelTxModal/style.js diff --git a/src/routes/safe/components/TransactionsNew/TxsTable/ExpandedTx/OwnersColumn/ButtonRow.jsx b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/OwnersColumn/ButtonRow.jsx similarity index 100% rename from src/routes/safe/components/TransactionsNew/TxsTable/ExpandedTx/OwnersColumn/ButtonRow.jsx rename to src/routes/safe/components/Transactions/TxsTable/ExpandedTx/OwnersColumn/ButtonRow.jsx diff --git a/src/routes/safe/components/TransactionsNew/TxsTable/ExpandedTx/OwnersColumn/List.jsx b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/OwnersColumn/List.jsx similarity index 100% rename from src/routes/safe/components/TransactionsNew/TxsTable/ExpandedTx/OwnersColumn/List.jsx rename to src/routes/safe/components/Transactions/TxsTable/ExpandedTx/OwnersColumn/List.jsx diff --git a/src/routes/safe/components/TransactionsNew/TxsTable/ExpandedTx/OwnersColumn/index.jsx b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/OwnersColumn/index.jsx similarity index 100% rename from src/routes/safe/components/TransactionsNew/TxsTable/ExpandedTx/OwnersColumn/index.jsx rename to src/routes/safe/components/Transactions/TxsTable/ExpandedTx/OwnersColumn/index.jsx diff --git a/src/routes/safe/components/TransactionsNew/TxsTable/ExpandedTx/OwnersColumn/style.js b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/OwnersColumn/style.js similarity index 100% rename from src/routes/safe/components/TransactionsNew/TxsTable/ExpandedTx/OwnersColumn/style.js rename to src/routes/safe/components/Transactions/TxsTable/ExpandedTx/OwnersColumn/style.js diff --git a/src/routes/safe/components/TransactionsNew/TxsTable/ExpandedTx/TxDescription/index.jsx b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/TxDescription/index.jsx similarity index 100% rename from src/routes/safe/components/TransactionsNew/TxsTable/ExpandedTx/TxDescription/index.jsx rename to src/routes/safe/components/Transactions/TxsTable/ExpandedTx/TxDescription/index.jsx diff --git a/src/routes/safe/components/TransactionsNew/TxsTable/ExpandedTx/TxDescription/utils.js b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/TxDescription/utils.js similarity index 100% rename from src/routes/safe/components/TransactionsNew/TxsTable/ExpandedTx/TxDescription/utils.js rename to src/routes/safe/components/Transactions/TxsTable/ExpandedTx/TxDescription/utils.js diff --git a/src/routes/safe/components/TransactionsNew/TxsTable/ExpandedTx/index.jsx b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/index.jsx similarity index 100% rename from src/routes/safe/components/TransactionsNew/TxsTable/ExpandedTx/index.jsx rename to src/routes/safe/components/Transactions/TxsTable/ExpandedTx/index.jsx diff --git a/src/routes/safe/components/TransactionsNew/TxsTable/ExpandedTx/style.js b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/style.js similarity index 100% rename from src/routes/safe/components/TransactionsNew/TxsTable/ExpandedTx/style.js rename to src/routes/safe/components/Transactions/TxsTable/ExpandedTx/style.js diff --git a/src/routes/safe/components/TransactionsNew/TxsTable/Status/assets/awaiting.svg b/src/routes/safe/components/Transactions/TxsTable/Status/assets/awaiting.svg similarity index 100% rename from src/routes/safe/components/TransactionsNew/TxsTable/Status/assets/awaiting.svg rename to src/routes/safe/components/Transactions/TxsTable/Status/assets/awaiting.svg diff --git a/src/routes/safe/components/TransactionsNew/TxsTable/Status/assets/error.svg b/src/routes/safe/components/Transactions/TxsTable/Status/assets/error.svg similarity index 100% rename from src/routes/safe/components/TransactionsNew/TxsTable/Status/assets/error.svg rename to src/routes/safe/components/Transactions/TxsTable/Status/assets/error.svg diff --git a/src/routes/safe/components/TransactionsNew/TxsTable/Status/assets/ok.svg b/src/routes/safe/components/Transactions/TxsTable/Status/assets/ok.svg similarity index 100% rename from src/routes/safe/components/TransactionsNew/TxsTable/Status/assets/ok.svg rename to src/routes/safe/components/Transactions/TxsTable/Status/assets/ok.svg diff --git a/src/routes/safe/components/TransactionsNew/TxsTable/Status/index.jsx b/src/routes/safe/components/Transactions/TxsTable/Status/index.jsx similarity index 100% rename from src/routes/safe/components/TransactionsNew/TxsTable/Status/index.jsx rename to src/routes/safe/components/Transactions/TxsTable/Status/index.jsx diff --git a/src/routes/safe/components/TransactionsNew/TxsTable/Status/style.js b/src/routes/safe/components/Transactions/TxsTable/Status/style.js similarity index 100% rename from src/routes/safe/components/TransactionsNew/TxsTable/Status/style.js rename to src/routes/safe/components/Transactions/TxsTable/Status/style.js diff --git a/src/routes/safe/components/TransactionsNew/TxsTable/columns.js b/src/routes/safe/components/Transactions/TxsTable/columns.js similarity index 100% rename from src/routes/safe/components/TransactionsNew/TxsTable/columns.js rename to src/routes/safe/components/Transactions/TxsTable/columns.js diff --git a/src/routes/safe/components/TransactionsNew/TxsTable/index.jsx b/src/routes/safe/components/Transactions/TxsTable/index.jsx similarity index 100% rename from src/routes/safe/components/TransactionsNew/TxsTable/index.jsx rename to src/routes/safe/components/Transactions/TxsTable/index.jsx diff --git a/src/routes/safe/components/TransactionsNew/TxsTable/style.js b/src/routes/safe/components/Transactions/TxsTable/style.js similarity index 100% rename from src/routes/safe/components/TransactionsNew/TxsTable/style.js rename to src/routes/safe/components/Transactions/TxsTable/style.js diff --git a/src/routes/safe/components/Transactions/actions.js b/src/routes/safe/components/Transactions/actions.js deleted file mode 100644 index 32f51f38..00000000 --- a/src/routes/safe/components/Transactions/actions.js +++ /dev/null @@ -1,12 +0,0 @@ -// @flow -import fetchTransactions from '~/routes/safe/store/actions/fetchTransactions' - -type FetchTransactions = typeof fetchTransactions - -export type Actions = { - fetchTransactions: FetchTransactions, -} - -export default { - fetchTransactions, -} diff --git a/src/routes/safe/components/Transactions/index.jsx b/src/routes/safe/components/Transactions/index.jsx index cdf30d0d..c8677ccd 100644 --- a/src/routes/safe/components/Transactions/index.jsx +++ b/src/routes/safe/components/Transactions/index.jsx @@ -1,65 +1,58 @@ // @flow -import * as React from 'react' +import React, { useEffect } from 'react' import { List } from 'immutable' -import { connect } from 'react-redux' -import { type Transaction } from '~/routes/safe/store/models/transaction' import NoTransactions from '~/routes/safe/components/Transactions/NoTransactions' -import GnoTransaction from '~/routes/safe/components/Transactions/Transaction' -import { sameAddress } from '~/logic/wallets/ethAddresses' -import { type Confirmation } from '~/routes/safe/store/models/confirmation' -import { processTransaction } from '~/logic/safe/safeFrontendOperations' -import selector, { type SelectorProps } from './selector' -import actions, { type Actions } from './actions' +import TxsTable from '~/routes/safe/components/Transactions/TxsTable' +import { type Transaction } from '~/routes/safe/store/models/transaction' +import { type Owner } from '~/routes/safe/store/models/owner' -type Props = SelectorProps & Actions & { - safeName: string, +type Props = { safeAddress: string, threshold: number, - -} -class Transactions extends React.Component { - componentDidMount() { - const { fetchTransactions, safeAddress } = this.props - - fetchTransactions(safeAddress) - } - - onProcessTx = async (tx: Transaction, alreadyConfirmed: number) => { - const { - fetchTransactions, safeAddress, userAddress, threshold, - } = this.props - - const confirmations = tx.get('confirmations') - const usersConfirmed = List(confirmations.map((confirmation: Confirmation) => - confirmation.get('owner').get('address'))) - const userHasAlreadyConfirmed = confirmations.filter((confirmation: Confirmation) => { - const ownerAddress = confirmation.get('owner').get('address') - const samePerson = sameAddress(ownerAddress, userAddress) - - return samePerson && confirmation.get('type') === 'confirmation' - }).count() > 0 - - if (userHasAlreadyConfirmed) { - throw new Error('Owner has already confirmed this transaction') - } - - await processTransaction(safeAddress, tx, alreadyConfirmed, userAddress, threshold, usersConfirmed) - fetchTransactions(safeAddress) - } - - render() { - const { transactions, safeName, threshold } = this.props - const hasTransactions = transactions.count() > 0 - - return ( - - { hasTransactions - ? transactions.map((tx: Transaction) => ) - : - } - - ) - } + fetchTransactions: Function, + transactions: List, + owners: List, + userAddress: string, + granted: boolean, + createTransaction: Function, + processTransaction: Function, } -export default connect(selector, actions)(Transactions) +const Transactions = ({ + transactions = List(), + owners, + threshold, + userAddress, + granted, + safeAddress, + createTransaction, + processTransaction, + fetchTransactions, +}: Props) => { + useEffect(() => { + fetchTransactions(safeAddress) + }, [safeAddress]) + + const hasTransactions = transactions.size > 0 + + return ( + + {hasTransactions ? ( + + ) : ( + + )} + + ) +} + +export default Transactions diff --git a/src/routes/safe/components/Transactions/selector.js b/src/routes/safe/components/Transactions/selector.js deleted file mode 100644 index 3722c407..00000000 --- a/src/routes/safe/components/Transactions/selector.js +++ /dev/null @@ -1,16 +0,0 @@ -// @flow -import { List } from 'immutable' -import { createStructuredSelector } from 'reselect' -import { type Transaction } from '~/routes/safe/store/models/transaction' -import { safeTransactionsSelector } from '~/routes/safe/store/selectors/index' -import { userAccountSelector } from '~/logic/wallets/store/selectors' - -export type SelectorProps = { - transactions: List, - userAddress: typeof userAccountSelector, -} - -export default createStructuredSelector({ - transactions: safeTransactionsSelector, - userAddress: userAccountSelector, -}) diff --git a/src/routes/safe/components/TransactionsNew/NoTransactions/index.jsx b/src/routes/safe/components/TransactionsNew/NoTransactions/index.jsx deleted file mode 100644 index a2ed8291..00000000 --- a/src/routes/safe/components/TransactionsNew/NoTransactions/index.jsx +++ /dev/null @@ -1,20 +0,0 @@ -// @flow -import * as React from 'react' -import Bold from '~/components/layout/Bold' -import Col from '~/components/layout/Col' -import Row from '~/components/layout/Row' -import Paragraph from '~/components/layout/Paragraph/index' - -export const NO_TRANSACTION_ROW_TEST_ID = 'no-transaction-row' - -const NoTransactions = () => ( - - - - No transactions found for this safe - - - -) - -export default NoTransactions diff --git a/src/routes/safe/components/TransactionsNew/index.jsx b/src/routes/safe/components/TransactionsNew/index.jsx deleted file mode 100644 index 317e967c..00000000 --- a/src/routes/safe/components/TransactionsNew/index.jsx +++ /dev/null @@ -1,58 +0,0 @@ -// @flow -import React, { useEffect } from 'react' -import { List } from 'immutable' -import NoTransactions from '~/routes/safe/components/TransactionsNew/NoTransactions' -import TxsTable from '~/routes/safe/components/TransactionsNew/TxsTable' -import { type Transaction } from '~/routes/safe/store/models/transaction' -import { type Owner } from '~/routes/safe/store/models/owner' - -type Props = { - safeAddress: string, - threshold: number, - fetchTransactions: Function, - transactions: List, - owners: List, - userAddress: string, - granted: boolean, - createTransaction: Function, - processTransaction: Function, -} - -const Transactions = ({ - transactions = List(), - owners, - threshold, - userAddress, - granted, - safeAddress, - createTransaction, - processTransaction, - fetchTransactions, -}: Props) => { - useEffect(() => { - fetchTransactions(safeAddress) - }, [safeAddress]) - - const hasTransactions = transactions.size > 0 - - return ( - - {hasTransactions ? ( - - ) : ( - - )} - - ) -} - -export default Transactions diff --git a/src/test/safe.dom.funds.threshold>1.test.js b/src/test/safe.dom.funds.threshold>1.test.js index 41716037..8b355f85 100644 --- a/src/test/safe.dom.funds.threshold>1.test.js +++ b/src/test/safe.dom.funds.threshold>1.test.js @@ -10,10 +10,10 @@ import '@testing-library/jest-dom/extend-expect' import { BALANCE_ROW_TEST_ID } from '~/routes/safe/components/Balances' import { fillAndSubmitSendFundsForm } from './utils/transactions' import { TRANSACTIONS_TAB_BTN_TEST_ID } from '~/routes/safe/components/Layout' -import { TRANSACTION_ROW_TEST_ID } from '~/routes/safe/components/TransactionsNew/TxsTable' +import { TRANSACTION_ROW_TEST_ID } from '~/routes/safe/components/Transactions/TxsTable' import { useTestAccountAt, resetTestAccount } from './utils/accounts' -import { CONFIRM_TX_BTN_TEST_ID, EXECUTE_TX_BTN_TEST_ID } from '~/routes/safe/components/TransactionsNew/TxsTable/ExpandedTx/OwnersColumn/ButtonRow' -import { APPROVE_TX_MODAL_SUBMIT_BTN_TEST_ID } from '~/routes/safe/components/TransactionsNew/TxsTable/ExpandedTx/ApproveTxModal' +import { CONFIRM_TX_BTN_TEST_ID, EXECUTE_TX_BTN_TEST_ID } from '~/routes/safe/components/Transactions/TxsTable/ExpandedTx/OwnersColumn/ButtonRow' +import { APPROVE_TX_MODAL_SUBMIT_BTN_TEST_ID } from '~/routes/safe/components/Transactions/TxsTable/ExpandedTx/ApproveTxModal' afterEach(resetTestAccount) diff --git a/src/test/utils/transactions/transactionList.helper.js b/src/test/utils/transactions/transactionList.helper.js index fe5946ee..2238dce7 100644 --- a/src/test/utils/transactions/transactionList.helper.js +++ b/src/test/utils/transactions/transactionList.helper.js @@ -3,12 +3,12 @@ import { fireEvent } from '@testing-library/react' import { sleep } from '~/utils/timer' import { shortVersionOf } from '~/logic/wallets/ethAddresses' import { TRANSACTIONS_TAB_BTN_TEST_ID } from '~/routes/safe/components/Layout' -import { TRANSACTION_ROW_TEST_ID } from '~/routes/safe/components/TransactionsNew/TxsTable' +import { TRANSACTION_ROW_TEST_ID } from '~/routes/safe/components/Transactions/TxsTable' import { TRANSACTIONS_DESC_ADD_OWNER_TEST_ID, TRANSACTIONS_DESC_REMOVE_OWNER_TEST_ID, TRANSACTIONS_DESC_SEND_TEST_ID, -} from '~/routes/safe/components/TransactionsNew/TxsTable/ExpandedTx/TxDescription' +} from '~/routes/safe/components/Transactions/TxsTable/ExpandedTx/TxDescription' export const getLastTransaction = async (SafeDom: React.Component) => { // Travel to transactions