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