From 8bc7d3efcc2afcfd0ae8d3ea1b71fc10677cb886 Mon Sep 17 00:00:00 2001 From: nicosampler Date: Wed, 29 Jul 2020 14:40:51 -0300 Subject: [PATCH] Connected wallet --- .../ProviderDetails/UserDetails.tsx | 4 +-- .../ProviderInfo/ProviderAccessible.tsx | 35 ++++++++++++++----- 2 files changed, 28 insertions(+), 11 deletions(-) diff --git a/src/components/Header/components/ProviderDetails/UserDetails.tsx b/src/components/Header/components/ProviderDetails/UserDetails.tsx index 73fbdf7c..adb5c035 100644 --- a/src/components/Header/components/ProviderDetails/UserDetails.tsx +++ b/src/components/Header/components/ProviderDetails/UserDetails.tsx @@ -2,11 +2,11 @@ import { withStyles } from '@material-ui/core/styles' import Dot from '@material-ui/icons/FiberManualRecord' import classNames from 'classnames' import * as React from 'react' +import { Identicon } from '@gnosis.pm/safe-react-components' import CopyBtn from 'src/components/CopyBtn' import EtherscanBtn from 'src/components/EtherscanBtn' import CircleDot from 'src/components/Header/components/CircleDot' -import Identicon from 'src/components/Identicon' import Spacer from 'src/components/Spacer' import Block from 'src/components/layout/Block' import Button from 'src/components/layout/Button' @@ -102,7 +102,7 @@ const UserDetails = ({ classes, connected, network, onDisconnect, openDashboard, {connected ? ( - + ) : ( )} diff --git a/src/components/Header/components/ProviderInfo/ProviderAccessible.tsx b/src/components/Header/components/ProviderInfo/ProviderAccessible.tsx index 61bf63b2..f94d032a 100644 --- a/src/components/Header/components/ProviderInfo/ProviderAccessible.tsx +++ b/src/components/Header/components/ProviderInfo/ProviderAccessible.tsx @@ -1,15 +1,25 @@ import { makeStyles } from '@material-ui/core/styles' import * as React from 'react' +import { AddressInfo, Identicon, Text } from '@gnosis.pm/safe-react-components' +import styled from 'styled-components' import NetworkLabel from '../NetworkLabel' import CircleDot from 'src/components/Header/components/CircleDot' -import Identicon from 'src/components/Identicon' import Col from 'src/components/layout/Col' import Paragraph from 'src/components/layout/Paragraph' -import { shortVersionOf } from 'src/logic/wallets/ethAddresses' import WalletIcon from '../WalletIcon' import { connected as connectedBg, screenSm, sm } from 'src/theme/variables' +const AddressWrapper = styled.div` + display: flex; + align-items: center; + + > div { + margin-left: 5px; + margin-top: 2px; + } +` + const useStyles = makeStyles({ network: { fontFamily: 'Averta, sans-serif', @@ -69,10 +79,7 @@ interface ProviderInfoProps { const ProviderInfo = ({ connected, provider, userAddress, network }: ProviderInfoProps): React.ReactElement => { const classes = useStyles() - const cutAddress = connected ? shortVersionOf(userAddress, 4) : 'Connection Error' - const color = connected ? 'primary' : 'warning' - const identiconAddress = userAddress || 'random' - + const addressColor = connected ? 'text' : 'warning' return ( <> {!connected && } @@ -89,10 +96,20 @@ const ProviderInfo = ({ connected, provider, userAddress, network }: ProviderInf {provider}
- {connected && } - + {connected ? ( + + + + + ) : ( + + Connection Error + + )} + + {/* {cutAddress} - + */}