From 512574ece2169aed6c2c71b30406a99fa7cfa61b Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Sun, 16 Dec 2018 23:49:14 +0100 Subject: [PATCH] custom loader type when coin is not supported by the firmware --- src/actions/SelectedAccountActions.js | 6 +++--- src/views/Wallet/components/Content/index.js | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/actions/SelectedAccountActions.js b/src/actions/SelectedAccountActions.js index 8f7d9445..b2dd5fe9 100644 --- a/src/actions/SelectedAccountActions.js +++ b/src/actions/SelectedAccountActions.js @@ -77,9 +77,9 @@ const getAccountLoader = (state: State, selectedAccount: SelectedAccountState): if (discovery && discovery.fwNotSupported) { return { - type: 'info', - title: `Device ${device.instanceLabel} is not supported`, - message: 'TODO: model T1 not supported explanation', + type: 'fwNotSupported', + title: `${network.name} is not supported with Trezor ${(device.features || {}).model}`, + message: 'Find more information on Trezor Wiki.', shouldRender: false, }; } diff --git a/src/views/Wallet/components/Content/index.js b/src/views/Wallet/components/Content/index.js index 229802e9..f5a38ebc 100644 --- a/src/views/Wallet/components/Content/index.js +++ b/src/views/Wallet/components/Content/index.js @@ -4,6 +4,7 @@ import styled from 'styled-components'; import Loader from 'components/Loader'; import { FONT_SIZE } from 'config/variables'; import colors from 'config/colors'; +import FirmwareUnsupported from './components/FirmwareUnsupported'; const Wrapper = styled.div` display: flex; @@ -41,6 +42,7 @@ const Content = ({ title, message, type, + networkShortcut, isLoading = false, }) => ( @@ -54,6 +56,9 @@ const Content = ({ {message && {message}} )} + {isLoading && (type === 'fwNotSupported') && ( + + )} ); @@ -63,6 +68,7 @@ Content.propTypes = { title: PropTypes.string, message: PropTypes.string, type: PropTypes.string, + networkShortcut: PropTypes.string, }; export default Content;