fix plural for components folder in safe router

This commit is contained in:
mmv 2019-04-19 16:11:54 +04:00
parent e8a43da257
commit 511a251ad2
64 changed files with 64 additions and 64 deletions

View File

@ -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:
/>
</Block>
<Block margin="md">
<Field
name={INCREASE_PARAM}
component={Checkbox}
type="checkbox"
/>
<Field name={INCREASE_PARAM} component={Checkbox} type="checkbox" />
<Block>Increase threshold?</Block>
</Block>
</OpenPaper>

View File

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

View File

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

View File

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

View File

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

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

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

View File

@ -19,28 +19,30 @@ type Props = {
const RemoveOwnerForm = ({
numOwners, threshold, name, disabled, pendingTransactions,
}: Props) => (controls: React$Node) => (
}: Props) => (
controls: React$Node,
) => (
<OpenPaper controls={controls}>
<Heading tag="h2" margin="lg">
Remove Owner { !!name && name }
Remove Owner
{' '}
{!!name && name}
</Heading>
<Heading tag="h4" margin="lg">
{`Actual number of owners: ${numOwners}, threhsold of safe: ${threshold}`}
</Heading>
{ pendingTransactions &&
{pendingTransactions && (
<SnackbarContent
variant="warning"
message="Be careful removing an owner might incur in some of the pending transactions could never be executed"
/>
}
)}
<Block margin="md">
<Field
name={DECREASE_PARAM}
component={Checkbox}
type="checkbox"
disabled={disabled}
/>
<Block>{disabled && '(disabled) '}Decrease threshold?</Block>
<Field name={DECREASE_PARAM} component={Checkbox} type="checkbox" disabled={disabled} />
<Block>
{disabled && '(disabled) '}
Decrease threshold?
</Block>
</Block>
</OpenPaper>
)

View File

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

View File

@ -11,8 +11,8 @@ const pendingTransactionsSelector = createSelector(
)
export type SelectorProps = {
executor: userAccountSelector,
pendingTransactions: pendingTransactionsSelector,
executor: typeof userAccountSelector,
pendingTransactions: typeof pendingTransactionsSelector,
}
export default createStructuredSelector({

View File

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

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

View File

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

View File

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

View File

@ -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<Object, *>({
userAddress: userAccountSelector,
})

View File

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

View File

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

View File

@ -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<Object, *>({
userAddress: userAccountSelector,
})

View File

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

View File

@ -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<Object, *>({
executionHash: transactionHashSector,
confirmed: confirmationsTransactionSelector,
userAddress: userAccountSelector,

View File

@ -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<Props, {}> {
componentDidMount() {
this.props.fetchTransactions(this.props.safeAddress)
const { fetchTransactions, safeAddress } = this.props
fetchTransactions(safeAddress)
}
onProcessTx = async (tx: Transaction, alreadyConfirmed: number) => {

View File

@ -7,10 +7,10 @@ import { userAccountSelector } from '~/logic/wallets/store/selectors'
export type SelectorProps = {
transactions: List<Transaction>,
userAddress: userAccountSelector,
userAddress: typeof userAccountSelector,
}
export default createStructuredSelector({
export default createStructuredSelector<Object, *>({
transactions: safeTransactionsSelector,
userAddress: userAccountSelector,
})

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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