From b09b5f854da507265205045244ec8eae3d7a774e Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Wed, 23 Jan 2019 16:05:24 +0100 Subject: [PATCH] swtich hardcoded T1 icons to DeviceIcon component --- src/components/modals/confirm/Action/index.js | 18 ++++++++++++++---- src/components/modals/confirm/SignTx/index.js | 5 ++--- src/components/modals/index.js | 4 ++-- src/components/modals/passphrase/Type/index.js | 5 ++--- .../DeviceMenu/components/MenuItems/index.js | 9 +++------ .../views/Account/Receive/ethereum/index.js | 6 ++---- .../views/Account/Receive/ripple/index.js | 6 ++---- 7 files changed, 27 insertions(+), 26 deletions(-) diff --git a/src/components/modals/confirm/Action/index.js b/src/components/modals/confirm/Action/index.js index f08427ad..ea510457 100644 --- a/src/components/modals/confirm/Action/index.js +++ b/src/components/modals/confirm/Action/index.js @@ -1,10 +1,15 @@ /* @flow */ import React from 'react'; +import PropTypes from 'prop-types'; import styled from 'styled-components'; import { H3 } from 'components/Heading'; -import ICONS from 'config/icons'; -import Icon from 'components/Icon'; +import DeviceIcon from 'components/images/DeviceIcon'; +import type { TrezorDevice } from 'flowtype'; + +type Props = { + device: TrezorDevice; +} const Wrapper = styled.div``; @@ -12,13 +17,18 @@ const Header = styled.div` padding: 48px; `; -const ConfirmAction = () => ( +const ConfirmAction = (props: Props) => (
- +

Confirm action on your Trezor

); +ConfirmAction.propTypes = { + device: PropTypes.object.isRequired, +}; + + export default ConfirmAction; \ No newline at end of file diff --git a/src/components/modals/confirm/SignTx/index.js b/src/components/modals/confirm/SignTx/index.js index ad9ccd86..8b12d2a8 100644 --- a/src/components/modals/confirm/SignTx/index.js +++ b/src/components/modals/confirm/SignTx/index.js @@ -4,12 +4,11 @@ import React from 'react'; import PropTypes from 'prop-types'; import styled from 'styled-components'; -import icons from 'config/icons'; import colors from 'config/colors'; import { LINE_HEIGHT, FONT_SIZE, FONT_WEIGHT } from 'config/variables'; import P from 'components/Paragraph'; -import Icon from 'components/Icon'; +import DeviceIcon from 'components/images/DeviceIcon'; import { H3 } from 'components/Heading'; import type { TrezorDevice, State } from 'flowtype'; @@ -71,7 +70,7 @@ const ConfirmSignTx = (props: Props) => { return (
- +

Confirm transaction on { props.device.label } device

Details are shown on display

diff --git a/src/components/modals/index.js b/src/components/modals/index.js index cd7edba8..519fc314 100644 --- a/src/components/modals/index.js +++ b/src/components/modals/index.js @@ -96,11 +96,11 @@ const getDeviceContextModal = (props: Props) => { } case 'ButtonRequest_ProtectCall': - return ; + return ; case 'ButtonRequest_Other': case 'ButtonRequest_ConfirmOutput': - return ; + return ; case RECEIVE.REQUEST_UNVERIFIED: return ( diff --git a/src/components/modals/passphrase/Type/index.js b/src/components/modals/passphrase/Type/index.js index fa44d5b1..0e62debb 100644 --- a/src/components/modals/passphrase/Type/index.js +++ b/src/components/modals/passphrase/Type/index.js @@ -4,10 +4,9 @@ import React from 'react'; import PropTypes from 'prop-types'; import styled from 'styled-components'; -import icons from 'config/icons'; import colors from 'config/colors'; -import Icon from 'components/Icon'; +import DeviceIcon from 'components/images/DeviceIcon'; import { H3 } from 'components/Heading'; import P from 'components/Paragraph'; @@ -27,7 +26,7 @@ const Header = styled.div``; const PassphraseType = (props: Props) => (
- +

Complete the action on { props.device.label } device

If you enter a wrong passphrase, you will not unlock the desired hidden wallet.

diff --git a/src/views/Wallet/components/LeftNavigation/components/DeviceMenu/components/MenuItems/index.js b/src/views/Wallet/components/LeftNavigation/components/DeviceMenu/components/MenuItems/index.js index c39de5a8..e18bedfe 100644 --- a/src/views/Wallet/components/LeftNavigation/components/DeviceMenu/components/MenuItems/index.js +++ b/src/views/Wallet/components/LeftNavigation/components/DeviceMenu/components/MenuItems/index.js @@ -2,6 +2,7 @@ import React, { PureComponent } from 'react'; import styled from 'styled-components'; import PropTypes from 'prop-types'; import Icon from 'components/Icon'; +import DeviceIcon from 'components/images/DeviceIcon'; import icons from 'config/icons'; import colors from 'config/colors'; @@ -77,11 +78,7 @@ class MenuItems extends PureComponent { {this.showClone() && ( this.onDeviceMenuClick('clone', this.props.device)}> - + )} @@ -89,7 +86,7 @@ class MenuItems extends PureComponent { this.onDeviceMenuClick('reload')} > - + )} diff --git a/src/views/Wallet/views/Account/Receive/ethereum/index.js b/src/views/Wallet/views/Account/Receive/ethereum/index.js index 34109886..f700b1a9 100644 --- a/src/views/Wallet/views/Account/Receive/ethereum/index.js +++ b/src/views/Wallet/views/Account/Receive/ethereum/index.js @@ -8,6 +8,7 @@ import Button from 'components/Button'; import Icon from 'components/Icon'; import Tooltip from 'components/Tooltip'; import Input from 'components/inputs/Input'; +import DeviceIcon from 'components/images/DeviceIcon'; import ICONS from 'config/icons'; import colors from 'config/colors'; @@ -131,10 +132,7 @@ const AccountReceive = (props: Props) => { isPartiallyHidden={isAddressHidden} trezorAction={isAddressVerifying ? ( - + Check address on your Trezor ) : null} diff --git a/src/views/Wallet/views/Account/Receive/ripple/index.js b/src/views/Wallet/views/Account/Receive/ripple/index.js index e439466a..dd59de81 100644 --- a/src/views/Wallet/views/Account/Receive/ripple/index.js +++ b/src/views/Wallet/views/Account/Receive/ripple/index.js @@ -8,6 +8,7 @@ import Button from 'components/Button'; import Icon from 'components/Icon'; import Tooltip from 'components/Tooltip'; import Input from 'components/inputs/Input'; +import DeviceIcon from 'components/images/DeviceIcon'; import ICONS from 'config/icons'; import colors from 'config/colors'; @@ -131,10 +132,7 @@ const AccountReceive = (props: Props) => { isPartiallyHidden={isAddressHidden} trezorAction={isAddressVerifying ? ( - + Check address on your Trezor ) : null}