From fec212f2d63e5be83cbaa20996b580676733744a Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Fri, 4 Oct 2019 12:01:17 +0400 Subject: [PATCH] dep bump, add copy/etherscan buttons to header provider details dropdown --- package.json | 6 ++-- .../component/ProviderDetails/UserDetails.jsx | 32 ++++++++--------- yarn.lock | 34 +++++++++---------- 3 files changed, 35 insertions(+), 37 deletions(-) diff --git a/package.json b/package.json index d7c186c1..5bf88bb4 100644 --- a/package.json +++ b/package.json @@ -50,8 +50,8 @@ "notistack": "https://github.com/gnosis/notistack.git#v0.9.4", "optimize-css-assets-webpack-plugin": "5.0.3", "qrcode.react": "^0.9.3", - "react": "16.10.1", - "react-dom": "16.10.1", + "react": "16.10.2", + "react-dom": "16.10.2", "react-final-form": "6.3.0", "react-final-form-listeners": "^1.0.2", "react-hot-loader": "4.12.14", @@ -97,7 +97,7 @@ "@storybook/addon-knobs": "5.2.1", "@storybook/addon-links": "5.2.1", "@storybook/react": "5.2.1", - "@testing-library/react": "9.2.0", + "@testing-library/react": "9.3.0", "autoprefixer": "9.6.1", "babel-core": "^7.0.0-bridge.0", "babel-eslint": "10.0.3", diff --git a/src/components/Header/component/ProviderDetails/UserDetails.jsx b/src/components/Header/component/ProviderDetails/UserDetails.jsx index a398be56..fa0c2939 100644 --- a/src/components/Header/component/ProviderDetails/UserDetails.jsx +++ b/src/components/Header/component/ProviderDetails/UserDetails.jsx @@ -1,11 +1,11 @@ // @flow import * as React from 'react' import classNames from 'classnames' -import OpenInNew from '@material-ui/icons/OpenInNew' import { withStyles } from '@material-ui/core/styles' import Dot from '@material-ui/icons/FiberManualRecord' +import EtherscanBtn from '~/components/EtherscanBtn' +import CopyBtn from '~/components/CopyBtn' import Paragraph from '~/components/layout/Paragraph' -import Link from '~/components/layout/Link' import Button from '~/components/layout/Button' import Identicon from '~/components/Identicon' import Hairline from '~/components/layout/Hairline' @@ -14,11 +14,10 @@ import Row from '~/components/layout/Row' import Block from '~/components/layout/Block' import Spacer from '~/components/Spacer' import { - xs, sm, md, lg, background, secondary, warning, connected as connectedBg, + xs, sm, md, lg, background, warning, connected as connectedBg, } from '~/theme/variables' import { upperFirst } from '~/utils/css' import { shortVersionOf } from '~/logic/wallets/ethAddresses' -import { getEtherScanLink } from '~/logic/wallets/getWeb3' import CircleDot from '~/components/Header/component/CircleDot' const metamaskIcon = require('../../assets/metamask-icon.svg') @@ -34,11 +33,6 @@ type Props = { onDisconnect: Function, } -const openIconStyle = { - height: '16px', - color: secondary, -} - const styles = () => ({ container: { padding: `${md} 12px`, @@ -65,7 +59,7 @@ const styles = () => ({ flexGrow: 1, textAlign: 'center', letterSpacing: '-0.5px', - fontSize: '12px', + marginRight: sm, }, labels: { fontSize: '12px', @@ -119,13 +113,15 @@ const UserDetails = ({ )} - + {address} {userAddress && ( - - - + <> + {' '} + + + )} @@ -146,9 +142,11 @@ const UserDetails = ({ Wallet - {provider === 'safe' - ? Safe client - : Metamask client} + {provider === 'safe' ? ( + Safe client + ) : ( + Metamask client + )} {upperFirst(provider)} diff --git a/yarn.lock b/yarn.lock index 87a59796..2c5d7105 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2531,10 +2531,10 @@ pretty-format "^24.0.0" redent "^3.0.0" -"@testing-library/react@9.2.0": - version "9.2.0" - resolved "https://registry.yarnpkg.com/@testing-library/react/-/react-9.2.0.tgz#143ad2d96b03c3c334e47aaf33cc2c9b7d007123" - integrity sha512-Hr87KZflfI+vPZjgyzBKQHolQHiXGU5aTGjQSCJdH/yGPbm+IzrvuWPS97GD3RUH3rSS1IXq1e2Sn8Hmyw2ctA== +"@testing-library/react@9.3.0": + version "9.3.0" + resolved "https://registry.yarnpkg.com/@testing-library/react/-/react-9.3.0.tgz#1dabf46d1ea018a1c89acecc0e7b86859b34c0f8" + integrity sha512-FTPCwmLo0tLtP50Au2uGz4/N1BcJTnBx4StDVHZ47zPMEj1/+J2rk/RTj8SLoHRKWCtcmhN4wRmudOXQNP29/w== dependencies: "@babel/runtime" "^7.6.0" "@testing-library/dom" "^6.3.0" @@ -14609,15 +14609,15 @@ react-docgen@^4.1.0: node-dir "^0.1.10" recast "^0.17.3" -react-dom@16.10.1: - version "16.10.1" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.10.1.tgz#479a6511ba34a429273c213cbc2a9ac4d296dac1" - integrity sha512-SmM4ZW0uug0rn95U8uqr52I7UdNf6wdGLeXDmNLfg3y5q5H9eAbdjF5ubQc3bjDyRrvdAB2IKG7X0GzSpnn5Mg== +react-dom@16.10.2: + version "16.10.2" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.10.2.tgz#4840bce5409176bc3a1f2bd8cb10b92db452fda6" + integrity sha512-kWGDcH3ItJK4+6Pl9DZB16BXYAZyrYQItU4OMy0jAkv5aNqc+mAKb4TpFtAteI6TJZu+9ZlNhaeNQSVQDHJzkw== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" prop-types "^15.6.2" - scheduler "^0.16.1" + scheduler "^0.16.2" react-dom@^16.8.3: version "16.8.6" @@ -14912,10 +14912,10 @@ react-window@^1.8.5: "@babel/runtime" "^7.0.0" memoize-one ">=3.1.1 <6" -react@16.10.1: - version "16.10.1" - resolved "https://registry.yarnpkg.com/react/-/react-16.10.1.tgz#967c1e71a2767dfa699e6ba702a00483e3b0573f" - integrity sha512-2bisHwMhxQ3XQz4LiJJwG3360pY965pTl/MRrZYxIBKVj4fOHoDs5aZAkYXGxDRO1Li+SyjTAilQEbOmtQJHzA== +react@16.10.2: + version "16.10.2" + resolved "https://registry.yarnpkg.com/react/-/react-16.10.2.tgz#a5ede5cdd5c536f745173c8da47bda64797a4cf0" + integrity sha512-MFVIq0DpIhrHFyqLU0S3+4dIcBhhOvBE8bJ/5kHPVOVaGdo0KuiQzpcjCPsf585WvhypqtrMILyoE2th6dT+Lw== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" @@ -15817,10 +15817,10 @@ scheduler@^0.13.6: loose-envify "^1.1.0" object-assign "^4.1.1" -scheduler@^0.16.1: - version "0.16.1" - resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.16.1.tgz#a6fb6ddec12dc2119176e6eb54ecfe69a9eba8df" - integrity sha512-MIuie7SgsqMYOdCXVFZa8SKoNorJZUWHW8dPgto7uEHn1lX3fg2Gu0TzgK8USj76uxV7vB5eRMnZs/cdEHg+cg== +scheduler@^0.16.2: + version "0.16.2" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.16.2.tgz#f74cd9d33eff6fc554edfb79864868e4819132c1" + integrity sha512-BqYVWqwz6s1wZMhjFvLfVR5WXP7ZY32M/wYPo04CcuPM7XZEbV2TBNW7Z0UkguPTl0dWMA59VbNXxK6q+pHItg== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1"