diff --git a/src/components/Header/component/ProviderDetails/UserDetails.jsx b/src/components/Header/component/ProviderDetails/UserDetails.jsx index 48d1f819..a398be56 100644 --- a/src/components/Header/component/ProviderDetails/UserDetails.jsx +++ b/src/components/Header/component/ProviderDetails/UserDetails.jsx @@ -118,7 +118,7 @@ const UserDetails = ({ )} - + {address} diff --git a/src/components/Sidebar/LegalLinks.jsx b/src/components/Sidebar/LegalLinks.jsx new file mode 100644 index 00000000..a3c79b5c --- /dev/null +++ b/src/components/Sidebar/LegalLinks.jsx @@ -0,0 +1,37 @@ +// @flow +import React from 'react' +import { makeStyles } from '@material-ui/core/styles' +import Block from '~/components/layout/Block' +import Link from '~/components/layout/Link' +import { sm, primary } from '~/theme/variables' + +const useStyles = makeStyles({ + container: { + padding: `${sm} 0`, + }, + link: { + color: primary, + }, +}) + +const LegalLinks = () => { + const classes = useStyles() + return ( + + + Terms + + + Privacy + + + Licenses + + + Imprint + + + ) +} + +export default LegalLinks diff --git a/src/components/Sidebar/SafeList/DefaultBadge.jsx b/src/components/Sidebar/SafeList/DefaultBadge.jsx index 467b605d..a0c441a5 100644 --- a/src/components/Sidebar/SafeList/DefaultBadge.jsx +++ b/src/components/Sidebar/SafeList/DefaultBadge.jsx @@ -24,7 +24,7 @@ const DefaultBadge = () => { const classes = useStyles() return ( - + Star Icon default diff --git a/src/components/Sidebar/index.jsx b/src/components/Sidebar/index.jsx index 07f3f9d1..4debf19d 100644 --- a/src/components/Sidebar/index.jsx +++ b/src/components/Sidebar/index.jsx @@ -12,13 +12,15 @@ import Link from '~/components/layout/Link' import Spacer from '~/components/Spacer' import Hairline from '~/components/layout/Hairline' import Row from '~/components/layout/Row' +import { WELCOME_ADDRESS } from '~/routes/routes' import { type Safe } from '~/routes/safe/store/models/safe' import { defaultSafeSelector } from '~/routes/safe/store/selectors' import setDefaultSafe from '~/routes/safe/store/actions/setDefaultSafe' import { sortedSafeListSelector } from './selectors' -import useSidebarStyles from './style' import SafeList from './SafeList' -import { WELCOME_ADDRESS } from '~/routes/routes' +import LegalLinks from './LegalLinks' +import useSidebarStyles from './style' + const { useState, useEffect } = React @@ -128,6 +130,7 @@ const Sidebar = ({ setDefaultSafe={setDefaultSafeAction} defaultSafe={defaultSafe} /> + {children} diff --git a/src/components/layout/Block/index.jsx b/src/components/layout/Block/index.jsx index e1aced02..4e9ec7db 100644 --- a/src/components/layout/Block/index.jsx +++ b/src/components/layout/Block/index.jsx @@ -12,7 +12,7 @@ const cx = classNames.bind(styles) type Props = { margin?: Size, padding?: Size, - align?: 'center' | 'right' | 'left', + justify?: 'center' | 'right' | 'left' | 'space-around', children: React.Node, className?: string, } @@ -20,12 +20,12 @@ type Props = { class Block extends PureComponent { render() { const { - margin, padding, align, children, className, ...props + margin, padding, justify, children, className, ...props } = this.props const paddingStyle = padding ? capitalize(padding, 'padding') : undefined return ( -
+
{children}
) diff --git a/src/components/layout/Block/index.scss b/src/components/layout/Block/index.scss index 54709a6a..cdc5383f 100644 --- a/src/components/layout/Block/index.scss +++ b/src/components/layout/Block/index.scss @@ -52,6 +52,12 @@ align-items: center; } +.space-around { + display: flex; + align-items: center; + justify-content: space-around; +} + .right { display: flex; align-items: center; diff --git a/src/logic/wallets/getWeb3.js b/src/logic/wallets/getWeb3.js index a849e047..051b3fa0 100644 --- a/src/logic/wallets/getWeb3.js +++ b/src/logic/wallets/getWeb3.js @@ -47,7 +47,7 @@ export const getEtherScanLink = (type: 'address' | 'tx', value: string) => { let web3 export const getWeb3 = () => web3 || (window.web3 && new Web3(window.web3.currentProvider)) || (window.ethereum && new Web3(window.ethereum)) -const getProviderName: Function = (web3Provider): boolean => { +const getProviderName: Function = (web3Provider): string => { let name switch (web3Provider.currentProvider.constructor.name) { @@ -58,7 +58,7 @@ const getProviderName: Function = (web3Provider): boolean => { name = WALLET_PROVIDER.METAMASK break default: - name = 'UNKNOWN' + name = 'Wallet' } return name @@ -86,10 +86,7 @@ export const getProviderInfo: Function = async (): Promise => { if (window.ethereum) { web3Provider = window.ethereum try { - const accounts = await web3Provider.enable() - if (!accounts) { - throw new Error() - } + await web3Provider.enable() } catch (error) { console.error('Error when enabling web3 provider', error) } diff --git a/src/routes/load/components/ReviewInformation/index.jsx b/src/routes/load/components/ReviewInformation/index.jsx index 72617944..4f84e8ea 100644 --- a/src/routes/load/components/ReviewInformation/index.jsx +++ b/src/routes/load/components/ReviewInformation/index.jsx @@ -164,7 +164,7 @@ class ReviewComponent extends React.PureComponent { {values[getOwnerNameBy(index)]} - + {address} diff --git a/src/routes/open/components/ReviewInformation/index.jsx b/src/routes/open/components/ReviewInformation/index.jsx index 296cea50..bcfadb71 100644 --- a/src/routes/open/components/ReviewInformation/index.jsx +++ b/src/routes/open/components/ReviewInformation/index.jsx @@ -144,7 +144,7 @@ const ReviewComponent = ({ values, classes, userAccount }: Props) => { {name} - + {addresses[index]} diff --git a/src/routes/open/components/SafeOwnersConfirmationsForm/ScanQRModal/index.jsx b/src/routes/open/components/SafeOwnersConfirmationsForm/ScanQRModal/index.jsx index 65b9ef99..8cc3e2ce 100644 --- a/src/routes/open/components/SafeOwnersConfirmationsForm/ScanQRModal/index.jsx +++ b/src/routes/open/components/SafeOwnersConfirmationsForm/ScanQRModal/index.jsx @@ -66,7 +66,7 @@ const ScanQRModal = ({ {hasWebcam === null ? ( - + ) : ( diff --git a/src/routes/safe/components/Balances/AssetTableCell/index.jsx b/src/routes/safe/components/Balances/AssetTableCell/index.jsx index d9dfbffb..1e98ba17 100644 --- a/src/routes/safe/components/Balances/AssetTableCell/index.jsx +++ b/src/routes/safe/components/Balances/AssetTableCell/index.jsx @@ -16,7 +16,7 @@ const AssetTableCell = (props: Props) => { const { asset } = props return ( - + {asset.name} {asset.name} diff --git a/src/routes/safe/components/Balances/Receive/index.jsx b/src/routes/safe/components/Balances/Receive/index.jsx index d45183a0..66c170a6 100644 --- a/src/routes/safe/components/Balances/Receive/index.jsx +++ b/src/routes/safe/components/Balances/Receive/index.jsx @@ -92,7 +92,7 @@ const Receive = ({ - + { diff --git a/src/routes/safe/components/Balances/Tokens/screens/AddCustomToken/index.jsx b/src/routes/safe/components/Balances/Tokens/screens/AddCustomToken/index.jsx index dbe9cc5d..d69c212e 100644 --- a/src/routes/safe/components/Balances/Tokens/screens/AddCustomToken/index.jsx +++ b/src/routes/safe/components/Balances/Tokens/screens/AddCustomToken/index.jsx @@ -174,7 +174,7 @@ const AddCustomToken = (props: Props) => { className={classes.addressInput} testId={ADD_CUSTOM_TOKEN_DECIMALS_INPUT_TEST_ID} /> - + Activate token for all Safes diff --git a/src/routes/safe/components/Balances/Tokens/screens/TokenList/index.jsx b/src/routes/safe/components/Balances/Tokens/screens/TokenList/index.jsx index aa4bc9db..8e6dc9a2 100644 --- a/src/routes/safe/components/Balances/Tokens/screens/TokenList/index.jsx +++ b/src/routes/safe/components/Balances/Tokens/screens/TokenList/index.jsx @@ -154,7 +154,7 @@ class Tokens extends React.Component { {!tokens.size && ( - + )} diff --git a/src/routes/safe/components/Layout.jsx b/src/routes/safe/components/Layout.jsx index 2071dcef..2daa7266 100644 --- a/src/routes/safe/components/Layout.jsx +++ b/src/routes/safe/components/Layout.jsx @@ -112,7 +112,7 @@ class Layout extends React.Component { {!granted && Read Only} - + {address} diff --git a/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/Review/index.jsx b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/Review/index.jsx index ec6b9054..920e852f 100644 --- a/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/Review/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/Review/index.jsx @@ -106,7 +106,7 @@ const ReviewAddOwner = ({ {owner.name} - + {owner.address} @@ -135,7 +135,7 @@ const ReviewAddOwner = ({ {values.ownerName} - + {values.ownerAddress} diff --git a/src/routes/safe/components/Settings/ManageOwners/EditOwnerModal/index.jsx b/src/routes/safe/components/Settings/ManageOwners/EditOwnerModal/index.jsx index 54c2d0d8..867d9db3 100644 --- a/src/routes/safe/components/Settings/ManageOwners/EditOwnerModal/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/EditOwnerModal/index.jsx @@ -98,7 +98,7 @@ const EditOwnerComponent = ({ /> - + {ownerAddress} diff --git a/src/routes/safe/components/Settings/ManageOwners/OwnerAddressTableCell/index.jsx b/src/routes/safe/components/Settings/ManageOwners/OwnerAddressTableCell/index.jsx index 5b7b8c9c..acfb1fe2 100644 --- a/src/routes/safe/components/Settings/ManageOwners/OwnerAddressTableCell/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/OwnerAddressTableCell/index.jsx @@ -11,7 +11,7 @@ type Props = { const OwnerAddressTableCell = (props: Props) => { const { address } = props return ( - + {address} diff --git a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/CheckOwner/index.jsx b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/CheckOwner/index.jsx index d4eb2a21..58096ae1 100644 --- a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/CheckOwner/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/CheckOwner/index.jsx @@ -64,7 +64,7 @@ const CheckOwner = ({ {ownerName} - + {ownerAddress} diff --git a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/Review/index.jsx b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/Review/index.jsx index 1f29c38b..6d61189a 100644 --- a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/Review/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/Review/index.jsx @@ -118,7 +118,7 @@ const ReviewRemoveOwner = ({ {owner.name} - + {owner.address} @@ -152,7 +152,7 @@ const ReviewRemoveOwner = ({ {ownerName} - + {ownerAddress} diff --git a/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/OwnerForm/index.jsx b/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/OwnerForm/index.jsx index ce62108e..e573fba9 100644 --- a/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/OwnerForm/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/OwnerForm/index.jsx @@ -95,7 +95,7 @@ const OwnerForm = ({ {ownerName} - + {ownerAddress} diff --git a/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/Review/index.jsx b/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/Review/index.jsx index 0a956687..aa677ce6 100644 --- a/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/Review/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/Review/index.jsx @@ -121,7 +121,7 @@ const ReviewRemoveOwner = ({ {owner.name} - + {owner.address} @@ -155,7 +155,7 @@ const ReviewRemoveOwner = ({ {ownerName} - + {ownerAddress} @@ -181,7 +181,7 @@ const ReviewRemoveOwner = ({ {values.ownerName} - + {values.ownerAddress} diff --git a/src/routes/safe/components/Settings/RemoveSafeModal/index.jsx b/src/routes/safe/components/Settings/RemoveSafeModal/index.jsx index 19a68bde..c0c68568 100644 --- a/src/routes/safe/components/Settings/RemoveSafeModal/index.jsx +++ b/src/routes/safe/components/Settings/RemoveSafeModal/index.jsx @@ -58,7 +58,7 @@ const RemoveSafeComponent = ({ {safeName} - + {safeAddress}