diff --git a/src/routes/safe/component/AddOwner/AddOwnerForm/index.jsx b/src/routes/safe/components/AddOwner/AddOwnerForm/index.jsx similarity index 88% rename from src/routes/safe/component/AddOwner/AddOwnerForm/index.jsx rename to src/routes/safe/components/AddOwner/AddOwnerForm/index.jsx index 6f9a301f..0171bebf 100644 --- a/src/routes/safe/component/AddOwner/AddOwnerForm/index.jsx +++ b/src/routes/safe/components/AddOwner/AddOwnerForm/index.jsx @@ -4,7 +4,9 @@ import Field from '~/components/forms/Field' import OpenPaper from '~/components/Stepper/OpenPaper' import TextField from '~/components/forms/TextField' import Checkbox from '~/components/forms/Checkbox' -import { composeValidators, required, mustBeEthereumAddress, uniqueAddress } from '~/components/forms/validator' +import { + composeValidators, required, mustBeEthereumAddress, uniqueAddress, +} from '~/components/forms/validator' import Block from '~/components/layout/Block' import Heading from '~/components/layout/Heading' @@ -27,7 +29,7 @@ export const safeFieldsValidation = (values: Object) => { type Props = { numOwners: number, threshold: number, - addresses: string[] + addresses: string[], } const AddOwnerForm = ({ addresses, numOwners, threshold }: Props) => (controls: React$Node) => ( @@ -59,11 +61,7 @@ const AddOwnerForm = ({ addresses, numOwners, threshold }: Props) => (controls: /> - + Increase threshold? diff --git a/src/routes/safe/component/AddOwner/Review/index.jsx b/src/routes/safe/components/AddOwner/Review/index.jsx similarity index 96% rename from src/routes/safe/component/AddOwner/Review/index.jsx rename to src/routes/safe/components/AddOwner/Review/index.jsx index b935c757..d352a1c1 100644 --- a/src/routes/safe/component/AddOwner/Review/index.jsx +++ b/src/routes/safe/components/AddOwner/Review/index.jsx @@ -6,7 +6,7 @@ import Block from '~/components/layout/Block' import Bold from '~/components/layout/Bold' import Heading from '~/components/layout/Heading' import Paragraph from '~/components/layout/Paragraph' -import { NAME_PARAM, OWNER_ADDRESS_PARAM, INCREASE_PARAM } from '~/routes/safe/component/AddOwner/AddOwnerForm' +import { NAME_PARAM, OWNER_ADDRESS_PARAM, INCREASE_PARAM } from '~/routes/safe/components/AddOwner/AddOwnerForm' type FormProps = { values: Object, diff --git a/src/routes/safe/component/AddOwner/actions.js b/src/routes/safe/components/AddOwner/actions.js similarity index 100% rename from src/routes/safe/component/AddOwner/actions.js rename to src/routes/safe/components/AddOwner/actions.js diff --git a/src/routes/safe/component/AddOwner/index.jsx b/src/routes/safe/components/AddOwner/index.jsx similarity index 98% rename from src/routes/safe/component/AddOwner/index.jsx rename to src/routes/safe/components/AddOwner/index.jsx index 4e1b61c0..533039a2 100644 --- a/src/routes/safe/component/AddOwner/index.jsx +++ b/src/routes/safe/components/AddOwner/index.jsx @@ -5,7 +5,7 @@ import Stepper from '~/components/Stepper' import { connect } from 'react-redux' import { type Safe } from '~/routes/safe/store/models/safe' import { type Owner, makeOwner } from '~/routes/safe/store/models/owner' -import { setOwners } from '~/utils/storage' +import { setOwners } from '~/logic/safe/utils' import { getSafeEthereumInstance, createTransaction } from '~/logic/safe/safeFrontendOperations' import AddOwnerForm, { NAME_PARAM, OWNER_ADDRESS_PARAM, INCREASE_PARAM } from './AddOwnerForm' import Review from './Review' diff --git a/src/routes/safe/component/AddOwner/selector.js b/src/routes/safe/components/AddOwner/selector.js similarity index 100% rename from src/routes/safe/component/AddOwner/selector.js rename to src/routes/safe/components/AddOwner/selector.js diff --git a/src/routes/safe/component/Balances/AssetTableCell/AssetTableCell.js b/src/routes/safe/components/Balances/AssetTableCell/AssetTableCell.js similarity index 100% rename from src/routes/safe/component/Balances/AssetTableCell/AssetTableCell.js rename to src/routes/safe/components/Balances/AssetTableCell/AssetTableCell.js diff --git a/src/routes/safe/component/Balances/AssetTableCell/index.js b/src/routes/safe/components/Balances/AssetTableCell/index.js similarity index 100% rename from src/routes/safe/component/Balances/AssetTableCell/index.js rename to src/routes/safe/components/Balances/AssetTableCell/index.js diff --git a/src/routes/safe/component/Balances/Receive/index.jsx b/src/routes/safe/components/Balances/Receive/index.jsx similarity index 100% rename from src/routes/safe/component/Balances/Receive/index.jsx rename to src/routes/safe/components/Balances/Receive/index.jsx diff --git a/src/routes/safe/component/Balances/Send/index.jsx b/src/routes/safe/components/Balances/Send/index.jsx similarity index 100% rename from src/routes/safe/component/Balances/Send/index.jsx rename to src/routes/safe/components/Balances/Send/index.jsx diff --git a/src/routes/safe/component/Balances/Tokens/actions.js b/src/routes/safe/components/Balances/Tokens/actions.js similarity index 100% rename from src/routes/safe/component/Balances/Tokens/actions.js rename to src/routes/safe/components/Balances/Tokens/actions.js diff --git a/src/routes/safe/component/Balances/Tokens/index.jsx b/src/routes/safe/components/Balances/Tokens/index.jsx similarity index 95% rename from src/routes/safe/component/Balances/Tokens/index.jsx rename to src/routes/safe/components/Balances/Tokens/index.jsx index 1fefd116..d848ddf5 100644 --- a/src/routes/safe/component/Balances/Tokens/index.jsx +++ b/src/routes/safe/components/Balances/Tokens/index.jsx @@ -8,7 +8,7 @@ import IconButton from '@material-ui/core/IconButton' import Paragraph from '~/components/layout/Paragraph' import Hairline from '~/components/layout/Hairline' import Row from '~/components/layout/Row' -import TokenList from '~/routes/safe/component/Balances/Tokens/screens/TokenList' +import TokenList from '~/routes/safe/components/Balances/Tokens/screens/TokenList' import { type Token } from '~/logic/tokens/store/model/token' import actions, { type Actions } from './actions' import { styles } from './style' diff --git a/src/routes/safe/component/Balances/Tokens/screens/TokenList/index.jsx b/src/routes/safe/components/Balances/Tokens/screens/TokenList/index.jsx similarity index 98% rename from src/routes/safe/component/Balances/Tokens/screens/TokenList/index.jsx rename to src/routes/safe/components/Balances/Tokens/screens/TokenList/index.jsx index 21c7956f..4a217e91 100644 --- a/src/routes/safe/component/Balances/Tokens/screens/TokenList/index.jsx +++ b/src/routes/safe/components/Balances/Tokens/screens/TokenList/index.jsx @@ -20,7 +20,7 @@ import Spacer from '~/components/Spacer' import Row from '~/components/layout/Row' import { ETH_ADDRESS } from '~/logic/tokens/utils/tokenHelpers' import { type Token } from '~/logic/tokens/store/model/token' -import { setImageToPlaceholder } from '~/routes/safe/component/Balances/utils' +import { setImageToPlaceholder } from '~/routes/safe/components/Balances/utils' import { styles } from './style' type Props = { diff --git a/src/routes/safe/component/Balances/Tokens/screens/TokenList/style.js b/src/routes/safe/components/Balances/Tokens/screens/TokenList/style.js similarity index 100% rename from src/routes/safe/component/Balances/Tokens/screens/TokenList/style.js rename to src/routes/safe/components/Balances/Tokens/screens/TokenList/style.js diff --git a/src/routes/safe/component/Balances/Tokens/style.js b/src/routes/safe/components/Balances/Tokens/style.js similarity index 100% rename from src/routes/safe/component/Balances/Tokens/style.js rename to src/routes/safe/components/Balances/Tokens/style.js diff --git a/src/routes/safe/component/Balances/assets/token_placeholder.svg b/src/routes/safe/components/Balances/assets/token_placeholder.svg similarity index 100% rename from src/routes/safe/component/Balances/assets/token_placeholder.svg rename to src/routes/safe/components/Balances/assets/token_placeholder.svg diff --git a/src/routes/safe/component/Balances/dataFetcher.js b/src/routes/safe/components/Balances/dataFetcher.js similarity index 100% rename from src/routes/safe/component/Balances/dataFetcher.js rename to src/routes/safe/components/Balances/dataFetcher.js diff --git a/src/routes/safe/component/Balances/index.jsx b/src/routes/safe/components/Balances/index.jsx similarity index 100% rename from src/routes/safe/component/Balances/index.jsx rename to src/routes/safe/components/Balances/index.jsx diff --git a/src/routes/safe/component/Balances/style.js b/src/routes/safe/components/Balances/style.js similarity index 100% rename from src/routes/safe/component/Balances/style.js rename to src/routes/safe/components/Balances/style.js diff --git a/src/routes/safe/component/Balances/utils/index.js b/src/routes/safe/components/Balances/utils/index.js similarity index 100% rename from src/routes/safe/component/Balances/utils/index.js rename to src/routes/safe/components/Balances/utils/index.js diff --git a/src/routes/safe/component/Balances/utils/setTokenImgToPlaceholder.js b/src/routes/safe/components/Balances/utils/setTokenImgToPlaceholder.js similarity index 55% rename from src/routes/safe/component/Balances/utils/setTokenImgToPlaceholder.js rename to src/routes/safe/components/Balances/utils/setTokenImgToPlaceholder.js index 086c1609..601ab9a4 100644 --- a/src/routes/safe/component/Balances/utils/setTokenImgToPlaceholder.js +++ b/src/routes/safe/components/Balances/utils/setTokenImgToPlaceholder.js @@ -1,5 +1,5 @@ // @flow -import TokenPlaceholder from '~/routes/safe/component/Balances/assets/token_placeholder.svg' +import TokenPlaceholder from '~/routes/safe/components/Balances/assets/token_placeholder.svg' export const setImageToPlaceholder = (e) => { e.target.onerror = null diff --git a/src/routes/safe/component/Layout.jsx b/src/routes/safe/components/Layout.jsx similarity index 100% rename from src/routes/safe/component/Layout.jsx rename to src/routes/safe/components/Layout.jsx diff --git a/src/routes/safe/component/Layout.stories.js b/src/routes/safe/components/Layout.stories.js similarity index 100% rename from src/routes/safe/component/Layout.stories.js rename to src/routes/safe/components/Layout.stories.js diff --git a/src/routes/safe/component/NoRights/index.jsx b/src/routes/safe/components/NoRights/index.jsx similarity index 100% rename from src/routes/safe/component/NoRights/index.jsx rename to src/routes/safe/components/NoRights/index.jsx diff --git a/src/routes/safe/component/NoRights/index.stories.js b/src/routes/safe/components/NoRights/index.stories.js similarity index 100% rename from src/routes/safe/component/NoRights/index.stories.js rename to src/routes/safe/components/NoRights/index.stories.js diff --git a/src/routes/safe/component/RemoveOwner/RemoveOwnerForm/index.jsx b/src/routes/safe/components/RemoveOwner/RemoveOwnerForm/index.jsx similarity index 76% rename from src/routes/safe/component/RemoveOwner/RemoveOwnerForm/index.jsx rename to src/routes/safe/components/RemoveOwner/RemoveOwnerForm/index.jsx index ed2bb42f..12264999 100644 --- a/src/routes/safe/component/RemoveOwner/RemoveOwnerForm/index.jsx +++ b/src/routes/safe/components/RemoveOwner/RemoveOwnerForm/index.jsx @@ -19,28 +19,30 @@ type Props = { const RemoveOwnerForm = ({ numOwners, threshold, name, disabled, pendingTransactions, -}: Props) => (controls: React$Node) => ( +}: Props) => ( + controls: React$Node, +) => ( - Remove Owner { !!name && name } + Remove Owner + {' '} + {!!name && name} {`Actual number of owners: ${numOwners}, threhsold of safe: ${threshold}`} - { pendingTransactions && + {pendingTransactions && ( - } + )} - - {disabled && '(disabled) '}Decrease threshold? + + + {disabled && '(disabled) '} + Decrease threshold? + ) diff --git a/src/routes/safe/component/RemoveOwner/Review/index.jsx b/src/routes/safe/components/RemoveOwner/Review/index.jsx similarity index 93% rename from src/routes/safe/component/RemoveOwner/Review/index.jsx rename to src/routes/safe/components/RemoveOwner/Review/index.jsx index 028ae4e4..63b0b9a7 100644 --- a/src/routes/safe/component/RemoveOwner/Review/index.jsx +++ b/src/routes/safe/components/RemoveOwner/Review/index.jsx @@ -6,7 +6,7 @@ import OpenPaper from '~/components/Stepper/OpenPaper' import Bold from '~/components/layout/Bold' import Heading from '~/components/layout/Heading' import Paragraph from '~/components/layout/Paragraph' -import { DECREASE_PARAM } from '~/routes/safe/component/RemoveOwner/RemoveOwnerForm' +import { DECREASE_PARAM } from '~/routes/safe/components/RemoveOwner/RemoveOwnerForm' type Props = { name: string, diff --git a/src/routes/safe/component/RemoveOwner/actions.js b/src/routes/safe/components/RemoveOwner/actions.js similarity index 100% rename from src/routes/safe/component/RemoveOwner/actions.js rename to src/routes/safe/components/RemoveOwner/actions.js diff --git a/src/routes/safe/component/RemoveOwner/index.jsx b/src/routes/safe/components/RemoveOwner/index.jsx similarity index 100% rename from src/routes/safe/component/RemoveOwner/index.jsx rename to src/routes/safe/components/RemoveOwner/index.jsx diff --git a/src/routes/safe/component/RemoveOwner/selector.js b/src/routes/safe/components/RemoveOwner/selector.js similarity index 87% rename from src/routes/safe/component/RemoveOwner/selector.js rename to src/routes/safe/components/RemoveOwner/selector.js index 6a99db36..92dacedb 100644 --- a/src/routes/safe/component/RemoveOwner/selector.js +++ b/src/routes/safe/components/RemoveOwner/selector.js @@ -11,8 +11,8 @@ const pendingTransactionsSelector = createSelector( ) export type SelectorProps = { - executor: userAccountSelector, - pendingTransactions: pendingTransactionsSelector, + executor: typeof userAccountSelector, + pendingTransactions: typeof pendingTransactionsSelector, } export default createStructuredSelector({ diff --git a/src/routes/safe/component/Safe/Address.jsx b/src/routes/safe/components/Safe/Address.jsx similarity index 100% rename from src/routes/safe/component/Safe/Address.jsx rename to src/routes/safe/components/Safe/Address.jsx diff --git a/src/routes/safe/component/Safe/BalanceInfo.jsx b/src/routes/safe/components/Safe/BalanceInfo.jsx similarity index 100% rename from src/routes/safe/component/Safe/BalanceInfo.jsx rename to src/routes/safe/components/Safe/BalanceInfo.jsx diff --git a/src/routes/safe/component/Safe/Confirmations.jsx b/src/routes/safe/components/Safe/Confirmations.jsx similarity index 100% rename from src/routes/safe/component/Safe/Confirmations.jsx rename to src/routes/safe/components/Safe/Confirmations.jsx diff --git a/src/routes/safe/component/Safe/MultisigTx.jsx b/src/routes/safe/components/Safe/MultisigTx.jsx similarity index 100% rename from src/routes/safe/component/Safe/MultisigTx.jsx rename to src/routes/safe/components/Safe/MultisigTx.jsx diff --git a/src/routes/safe/component/Safe/Owners.jsx b/src/routes/safe/components/Safe/Owners.jsx similarity index 100% rename from src/routes/safe/component/Safe/Owners.jsx rename to src/routes/safe/components/Safe/Owners.jsx diff --git a/src/routes/safe/component/Safe/assets/gnosis_safe.svg b/src/routes/safe/components/Safe/assets/gnosis_safe.svg similarity index 100% rename from src/routes/safe/component/Safe/assets/gnosis_safe.svg rename to src/routes/safe/components/Safe/assets/gnosis_safe.svg diff --git a/src/routes/safe/component/Safe/index.jsx b/src/routes/safe/components/Safe/index.jsx similarity index 92% rename from src/routes/safe/component/Safe/index.jsx rename to src/routes/safe/components/Safe/index.jsx index 290a491e..2399ff89 100644 --- a/src/routes/safe/component/Safe/index.jsx +++ b/src/routes/safe/components/Safe/index.jsx @@ -11,11 +11,11 @@ import Row from '~/components/layout/Row' import { type Safe } from '~/routes/safe/store/models/safe' import { type Token } from '~/logic/tokens/store/model/token' -import Transactions from '~/routes/safe/component/Transactions' -import Threshold from '~/routes/safe/component/Threshold' -import AddOwner from '~/routes/safe/component/AddOwner' -import RemoveOwner from '~/routes/safe/component/RemoveOwner' -import SendToken from '~/routes/safe/component/SendToken' +import Transactions from '~/routes/safe/components/Transactions' +import Threshold from '~/routes/safe/components/Threshold' +import AddOwner from '~/routes/safe/components/AddOwner' +import RemoveOwner from '~/routes/safe/components/RemoveOwner' +import SendToken from '~/routes/safe/components/SendToken' import Address from './Address' import BalanceInfo from './BalanceInfo' diff --git a/src/routes/safe/component/SendToken/ReviewTx/index.jsx b/src/routes/safe/components/SendToken/ReviewTx/index.jsx similarity index 95% rename from src/routes/safe/component/SendToken/ReviewTx/index.jsx rename to src/routes/safe/components/SendToken/ReviewTx/index.jsx index 10a5ea55..7f9ef2bd 100644 --- a/src/routes/safe/component/SendToken/ReviewTx/index.jsx +++ b/src/routes/safe/components/SendToken/ReviewTx/index.jsx @@ -6,7 +6,7 @@ import Bold from '~/components/layout/Bold' import OpenPaper from '~/components/Stepper/OpenPaper' import Heading from '~/components/layout/Heading' import Paragraph from '~/components/layout/Paragraph' -import { TKN_DESTINATION_PARAM, TKN_VALUE_PARAM } from '~/routes/safe/component/SendToken/SendTokenForm/index' +import { TKN_DESTINATION_PARAM, TKN_VALUE_PARAM } from '~/routes/safe/components/SendToken/SendTokenForm/index' type FormProps = { values: Object, diff --git a/src/routes/safe/component/SendToken/SendTokenForm/index.jsx b/src/routes/safe/components/SendToken/SendTokenForm/index.jsx similarity index 100% rename from src/routes/safe/component/SendToken/SendTokenForm/index.jsx rename to src/routes/safe/components/SendToken/SendTokenForm/index.jsx diff --git a/src/routes/safe/component/SendToken/actions.js b/src/routes/safe/components/SendToken/actions.js similarity index 100% rename from src/routes/safe/component/SendToken/actions.js rename to src/routes/safe/components/SendToken/actions.js diff --git a/src/routes/safe/component/SendToken/index.jsx b/src/routes/safe/components/SendToken/index.jsx similarity index 98% rename from src/routes/safe/component/SendToken/index.jsx rename to src/routes/safe/components/SendToken/index.jsx index 905c638a..06adea87 100644 --- a/src/routes/safe/component/SendToken/index.jsx +++ b/src/routes/safe/components/SendToken/index.jsx @@ -7,7 +7,7 @@ import { sleep } from '~/utils/timer' import { type Safe } from '~/routes/safe/store/models/safe' import { getStandardTokenContract } from '~/logic/tokens/store/actions/fetchTokens' import { type Token } from '~/logic/tokens/store/model/token' -import { isEther } from '~/logic/tokens/utils/tokens' +import { isEther } from '~/logic/tokens/utils/tokenHelpers' import { EMPTY_DATA } from '~/logic/wallets/ethTransactions' import { toNative } from '~/logic/wallets/tokens' import { createTransaction, getSafeEthereumInstance } from '~/logic/safe/safeFrontendOperations' diff --git a/src/routes/safe/component/SendToken/selector.js b/src/routes/safe/components/SendToken/selector.js similarity index 68% rename from src/routes/safe/component/SendToken/selector.js rename to src/routes/safe/components/SendToken/selector.js index cefe3460..8701f74b 100644 --- a/src/routes/safe/component/SendToken/selector.js +++ b/src/routes/safe/components/SendToken/selector.js @@ -3,9 +3,9 @@ import { createStructuredSelector } from 'reselect' import { userAccountSelector } from '~/logic/wallets/store/selectors' export type SelectorProps = { - userAddress: userAccountSelector, + userAddress: typeof userAccountSelector, } -export default createStructuredSelector({ +export default createStructuredSelector({ userAddress: userAccountSelector, }) diff --git a/src/routes/safe/component/Threshold/Review/index.jsx b/src/routes/safe/components/Threshold/Review/index.jsx similarity index 91% rename from src/routes/safe/component/Threshold/Review/index.jsx rename to src/routes/safe/components/Threshold/Review/index.jsx index 85119421..429e939a 100644 --- a/src/routes/safe/component/Threshold/Review/index.jsx +++ b/src/routes/safe/components/Threshold/Review/index.jsx @@ -6,7 +6,7 @@ import Bold from '~/components/layout/Bold' import OpenPaper from '~/components/Stepper/OpenPaper' import Heading from '~/components/layout/Heading' import Paragraph from '~/components/layout/Paragraph' -import { THRESHOLD_PARAM } from '~/routes/safe/component/Threshold/ThresholdForm' +import { THRESHOLD_PARAM } from '~/routes/safe/components/Threshold/ThresholdForm' type FormProps = { values: Object, diff --git a/src/routes/safe/component/Threshold/ThresholdForm/index.jsx b/src/routes/safe/components/Threshold/ThresholdForm/index.jsx similarity index 100% rename from src/routes/safe/component/Threshold/ThresholdForm/index.jsx rename to src/routes/safe/components/Threshold/ThresholdForm/index.jsx diff --git a/src/routes/safe/component/Transactions/actions.js b/src/routes/safe/components/Threshold/actions.js similarity index 63% rename from src/routes/safe/component/Transactions/actions.js rename to src/routes/safe/components/Threshold/actions.js index 32f51f38..681ad469 100644 --- a/src/routes/safe/component/Transactions/actions.js +++ b/src/routes/safe/components/Threshold/actions.js @@ -1,10 +1,8 @@ // @flow import fetchTransactions from '~/routes/safe/store/actions/fetchTransactions' -type FetchTransactions = typeof fetchTransactions - export type Actions = { - fetchTransactions: FetchTransactions, + fetchTransactions: typeof fetchTransactions, } export default { diff --git a/src/routes/safe/component/Threshold/index.jsx b/src/routes/safe/components/Threshold/index.jsx similarity index 100% rename from src/routes/safe/component/Threshold/index.jsx rename to src/routes/safe/components/Threshold/index.jsx diff --git a/src/routes/safe/component/Threshold/selector.js b/src/routes/safe/components/Threshold/selector.js similarity index 68% rename from src/routes/safe/component/Threshold/selector.js rename to src/routes/safe/components/Threshold/selector.js index cefe3460..8701f74b 100644 --- a/src/routes/safe/component/Threshold/selector.js +++ b/src/routes/safe/components/Threshold/selector.js @@ -3,9 +3,9 @@ import { createStructuredSelector } from 'reselect' import { userAccountSelector } from '~/logic/wallets/store/selectors' export type SelectorProps = { - userAddress: userAccountSelector, + userAddress: typeof userAccountSelector, } -export default createStructuredSelector({ +export default createStructuredSelector({ userAddress: userAccountSelector, }) diff --git a/src/routes/safe/component/Transactions/Collapsed/Confirmations.jsx b/src/routes/safe/components/Transactions/Collapsed/Confirmations.jsx similarity index 100% rename from src/routes/safe/component/Transactions/Collapsed/Confirmations.jsx rename to src/routes/safe/components/Transactions/Collapsed/Confirmations.jsx diff --git a/src/routes/safe/component/Transactions/Collapsed/index.jsx b/src/routes/safe/components/Transactions/Collapsed/index.jsx similarity index 100% rename from src/routes/safe/component/Transactions/Collapsed/index.jsx rename to src/routes/safe/components/Transactions/Collapsed/index.jsx diff --git a/src/routes/safe/component/Transactions/NoTransactions/index.jsx b/src/routes/safe/components/Transactions/NoTransactions/index.jsx similarity index 100% rename from src/routes/safe/component/Transactions/NoTransactions/index.jsx rename to src/routes/safe/components/Transactions/NoTransactions/index.jsx diff --git a/src/routes/safe/component/Transactions/Transaction/index.jsx b/src/routes/safe/components/Transactions/Transaction/index.jsx similarity index 98% rename from src/routes/safe/component/Transactions/Transaction/index.jsx rename to src/routes/safe/components/Transactions/Transaction/index.jsx index 389ebb06..b455e43f 100644 --- a/src/routes/safe/component/Transactions/Transaction/index.jsx +++ b/src/routes/safe/components/Transactions/Transaction/index.jsx @@ -15,7 +15,7 @@ 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/component/Transactions/Collapsed' +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' diff --git a/src/routes/safe/component/Transactions/Transaction/selector.js b/src/routes/safe/components/Transactions/Transaction/selector.js similarity index 86% rename from src/routes/safe/component/Transactions/Transaction/selector.js rename to src/routes/safe/components/Transactions/Transaction/selector.js index 13e75084..d2bcab74 100644 --- a/src/routes/safe/component/Transactions/Transaction/selector.js +++ b/src/routes/safe/components/Transactions/Transaction/selector.js @@ -7,8 +7,8 @@ import { type GlobalState } from '~/store' import { type Confirmation } from '~/routes/safe/store/models/confirmation' export type SelectorProps = { - confirmed: confirmationsTransactionSelector, - userAddress: userAccountSelector, + confirmed: typeof confirmationsTransactionSelector, + userAddress: typeof userAccountSelector, executionHash: string, } @@ -27,7 +27,7 @@ const transactionHashSector = (state: GlobalState, props: TxProps) => { return executedConf ? executedConf.get('hash') : undefined } -export default createStructuredSelector({ +export default createStructuredSelector({ executionHash: transactionHashSector, confirmed: confirmationsTransactionSelector, userAddress: userAccountSelector, diff --git a/src/routes/safe/component/Threshold/actions.js b/src/routes/safe/components/Transactions/actions.js similarity index 100% rename from src/routes/safe/component/Threshold/actions.js rename to src/routes/safe/components/Transactions/actions.js diff --git a/src/routes/safe/component/Transactions/index.jsx b/src/routes/safe/components/Transactions/index.jsx similarity index 89% rename from src/routes/safe/component/Transactions/index.jsx rename to src/routes/safe/components/Transactions/index.jsx index 32676d64..cdf30d0d 100644 --- a/src/routes/safe/component/Transactions/index.jsx +++ b/src/routes/safe/components/Transactions/index.jsx @@ -3,8 +3,8 @@ import * as React 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/component/Transactions/NoTransactions' -import GnoTransaction from '~/routes/safe/component/Transactions/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' @@ -19,7 +19,9 @@ type Props = SelectorProps & Actions & { } class Transactions extends React.Component { componentDidMount() { - this.props.fetchTransactions(this.props.safeAddress) + const { fetchTransactions, safeAddress } = this.props + + fetchTransactions(safeAddress) } onProcessTx = async (tx: Transaction, alreadyConfirmed: number) => { diff --git a/src/routes/safe/component/Transactions/selector.js b/src/routes/safe/components/Transactions/selector.js similarity index 82% rename from src/routes/safe/component/Transactions/selector.js rename to src/routes/safe/components/Transactions/selector.js index bb199222..3722c407 100644 --- a/src/routes/safe/component/Transactions/selector.js +++ b/src/routes/safe/components/Transactions/selector.js @@ -7,10 +7,10 @@ import { userAccountSelector } from '~/logic/wallets/store/selectors' export type SelectorProps = { transactions: List, - userAddress: userAccountSelector, + userAddress: typeof userAccountSelector, } -export default createStructuredSelector({ +export default createStructuredSelector({ transactions: safeTransactionsSelector, userAddress: userAccountSelector, }) diff --git a/src/routes/safe/container/index.jsx b/src/routes/safe/container/index.jsx index 374089fe..58242928 100644 --- a/src/routes/safe/container/index.jsx +++ b/src/routes/safe/container/index.jsx @@ -2,7 +2,7 @@ import * as React from 'react' import { connect } from 'react-redux' import Page from '~/components/layout/Page' -import Layout from '~/routes/safe/component/Layout' +import Layout from '~/routes/safe/components/Layout' import selector, { type SelectorProps } from './selector' import actions, { type Actions } from './actions' diff --git a/src/test/builder/safe.dom.builder.js b/src/test/builder/safe.dom.builder.js index 73f8b4cf..033b4404 100644 --- a/src/test/builder/safe.dom.builder.js +++ b/src/test/builder/safe.dom.builder.js @@ -1,14 +1,14 @@ // @flow import { type Store } from 'redux' import TestUtils from 'react-dom/test-utils' -import SafeView from '~/routes/safe/component/Safe' +import SafeView from '~/routes/safe/components/Safe' import { aNewStore, type GlobalState } from '~/store' import { sleep } from '~/utils/timer' import { getWeb3 } from '~/logic/wallets/getWeb3' import { addEtherTo } from '~/test/utils/tokenMovements' import { aMinedSafe } from '~/test/builder/safe.redux.builder' import { travelToSafe } from '~/test/builder/safe.dom.utils' -import { MOVE_FUNDS_BUTTON_TEXT } from '~/routes/safe/component/Safe/BalanceInfo' +import { MOVE_FUNDS_BUTTON_TEXT } from '~/routes/safe/components/Safe/BalanceInfo' export type DomSafe = { address: string, diff --git a/src/test/builder/safe.dom.utils.js b/src/test/builder/safe.dom.utils.js index 334c6f86..d04f7042 100644 --- a/src/test/builder/safe.dom.utils.js +++ b/src/test/builder/safe.dom.utils.js @@ -2,7 +2,7 @@ import * as React from 'react' import TestUtils from 'react-dom/test-utils' import ListItemText from '~/components/List/ListItemText/index' -import { SEE_MULTISIG_BUTTON_TEXT } from '~/routes/safe/component/Safe/MultisigTx' +import { SEE_MULTISIG_BUTTON_TEXT } from '~/routes/safe/components/Safe/MultisigTx' import fetchTransactions from '~/routes/safe/store/actions/fetchTransactions' import { sleep } from '~/utils/timer' import { Provider } from 'react-redux' diff --git a/src/test/safe.dom.transactions.test.js b/src/test/safe.dom.transactions.test.js index 2bed1bde..f492ffad 100644 --- a/src/test/safe.dom.transactions.test.js +++ b/src/test/safe.dom.transactions.test.js @@ -1,7 +1,7 @@ // @flow import TestUtils from 'react-dom/test-utils' import { List } from 'immutable' -import Transaction from '~/routes/safe/component/Transactions/Transaction' +import Transaction from '~/routes/safe/components/Transactions/Transaction' import { listTxsClickingOn, LIST_TXS_INDEX, diff --git a/src/test/safe.redux.owners.test.js b/src/test/safe.redux.owners.test.js index 73ef32aa..3a2eb72e 100644 --- a/src/test/safe.redux.owners.test.js +++ b/src/test/safe.redux.owners.test.js @@ -7,11 +7,11 @@ import fetchTransactions from '~/routes/safe/store/actions/fetchTransactions' import { type Safe } from '~/routes/safe/store/models/safe' import { getGnosisSafeInstanceAt } from '~/logic/contracts/safeContracts' import { aMinedSafe } from '~/test/builder/safe.redux.builder' -import { NAME_PARAM, OWNER_ADDRESS_PARAM, INCREASE_PARAM } from '~/routes/safe/component/AddOwner/AddOwnerForm' -import { addOwner } from '~/routes/safe/component/AddOwner/index' +import { NAME_PARAM, OWNER_ADDRESS_PARAM, INCREASE_PARAM } from '~/routes/safe/components/AddOwner/AddOwnerForm' +import { addOwner } from '~/routes/safe/components/AddOwner/index' import fetchSafe from '~/routes/safe/store/actions/fetchSafe' -import { removeOwner, shouldDecrease, initialValuesFrom } from '~/routes/safe/component/RemoveOwner' -import { DECREASE_PARAM } from '~/routes/safe/component/RemoveOwner/RemoveOwnerForm' +import { removeOwner, shouldDecrease, initialValuesFrom } from '~/routes/safe/components/RemoveOwner' +import { DECREASE_PARAM } from '~/routes/safe/components/RemoveOwner/RemoveOwnerForm' import { getSafeFrom } from '~/test/utils/safeHelper' import { getOwnerNameBy, getOwnerAddressBy } from '~/routes/open/components/fields' import { processTransaction } from '~/logic/safe/safeFrontendOperations' diff --git a/src/test/utils/transactions/addOwner.helper.js b/src/test/utils/transactions/addOwner.helper.js index e04f2acf..1361ee21 100644 --- a/src/test/utils/transactions/addOwner.helper.js +++ b/src/test/utils/transactions/addOwner.helper.js @@ -3,7 +3,7 @@ import TestUtils from 'react-dom/test-utils' import { sleep } from '~/utils/timer' import { checkMinedTx, checkPendingTx } from '~/test/builder/safe.dom.utils' import { whenExecuted } from '~/test/utils/logTransactions' -import AddOwner from '~/routes/safe/component/AddOwner' +import AddOwner from '~/routes/safe/components/AddOwner' export const sendAddOwnerForm = async ( SafeDom: React$Component, diff --git a/src/test/utils/transactions/moveFunds.helper.js b/src/test/utils/transactions/moveFunds.helper.js index a68c234e..7024d204 100644 --- a/src/test/utils/transactions/moveFunds.helper.js +++ b/src/test/utils/transactions/moveFunds.helper.js @@ -2,7 +2,7 @@ import TestUtils from 'react-dom/test-utils' import { sleep } from '~/utils/timer' import { checkMinedTx, checkPendingTx } from '~/test/builder/safe.dom.utils' -import SendToken from '~/routes/safe/component/SendToken' +import SendToken from '~/routes/safe/components/SendToken' import { whenExecuted } from '~/test/utils/logTransactions' export const sendMoveFundsForm = async ( diff --git a/src/test/utils/transactions/moveTokens.helper.js b/src/test/utils/transactions/moveTokens.helper.js index 4bde993d..c01d5204 100644 --- a/src/test/utils/transactions/moveTokens.helper.js +++ b/src/test/utils/transactions/moveTokens.helper.js @@ -5,7 +5,7 @@ import { sleep } from '~/utils/timer' import * as fetchTokensAction from '~/logic/tokens/store/actions/fetchTokens' import { checkMinedTx, checkPendingTx, EXPAND_BALANCE_INDEX } from '~/test/builder/safe.dom.utils' import { whenExecuted } from '~/test/utils/logTransactions' -import SendToken from '~/routes/safe/component/SendToken' +import SendToken from '~/routes/safe/components/SendToken' import { makeToken, type Token } from '~/logic/tokens/store/model/token' import addTokens from '~/logic/tokens/store/actions/saveTokens' diff --git a/src/test/utils/transactions/removeOwner.helper.js b/src/test/utils/transactions/removeOwner.helper.js index abe82254..c09c0548 100644 --- a/src/test/utils/transactions/removeOwner.helper.js +++ b/src/test/utils/transactions/removeOwner.helper.js @@ -4,7 +4,7 @@ import { sleep } from '~/utils/timer' import { checkMinedTx, EXPAND_OWNERS_INDEX, checkPendingTx } from '~/test/builder/safe.dom.utils' import { filterMoveButtonsFrom } from '~/test/builder/safe.dom.builder' import { whenExecuted } from '~/test/utils/logTransactions' -import RemoveOwner from '~/routes/safe/component/RemoveOwner' +import RemoveOwner from '~/routes/safe/components/RemoveOwner' export const sendRemoveOwnerForm = async ( SafeDom: React$Component, diff --git a/src/test/utils/transactions/threshold.helper.js b/src/test/utils/transactions/threshold.helper.js index 4ebd5c04..79663fa3 100644 --- a/src/test/utils/transactions/threshold.helper.js +++ b/src/test/utils/transactions/threshold.helper.js @@ -3,7 +3,7 @@ import TestUtils from 'react-dom/test-utils' import { sleep } from '~/utils/timer' import { checkMinedTx } from '~/test/builder/safe.dom.utils' import { getGnosisSafeInstanceAt } from '~/logic/contracts/safeContracts' -import Threshold from '~/routes/safe/component/Threshold' +import Threshold from '~/routes/safe/components/Threshold' import { whenExecuted } from '~/test/utils/logTransactions' export const sendChangeThresholdForm = async (