1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-11-30 20:28:09 +00:00

custom loader type when coin is not supported by the firmware

This commit is contained in:
slowbackspace 2018-12-16 23:49:14 +01:00
parent 3566f1b3c5
commit 512574ece2
2 changed files with 9 additions and 3 deletions

View File

@ -77,9 +77,9 @@ const getAccountLoader = (state: State, selectedAccount: SelectedAccountState):
if (discovery && discovery.fwNotSupported) { if (discovery && discovery.fwNotSupported) {
return { return {
type: 'info', type: 'fwNotSupported',
title: `Device ${device.instanceLabel} is not supported`, title: `${network.name} is not supported with Trezor ${(device.features || {}).model}`,
message: 'TODO: model T1 not supported explanation', message: 'Find more information on Trezor Wiki.',
shouldRender: false, shouldRender: false,
}; };
} }

View File

@ -4,6 +4,7 @@ import styled from 'styled-components';
import Loader from 'components/Loader'; import Loader from 'components/Loader';
import { FONT_SIZE } from 'config/variables'; import { FONT_SIZE } from 'config/variables';
import colors from 'config/colors'; import colors from 'config/colors';
import FirmwareUnsupported from './components/FirmwareUnsupported';
const Wrapper = styled.div` const Wrapper = styled.div`
display: flex; display: flex;
@ -41,6 +42,7 @@ const Content = ({
title, title,
message, message,
type, type,
networkShortcut,
isLoading = false, isLoading = false,
}) => ( }) => (
<Wrapper> <Wrapper>
@ -54,6 +56,9 @@ const Content = ({
{message && <Message>{message}</Message>} {message && <Message>{message}</Message>}
</Loading> </Loading>
)} )}
{isLoading && (type === 'fwNotSupported') && (
<FirmwareUnsupported title={title} message={message} networkShortcut={networkShortcut} />
)}
</Wrapper> </Wrapper>
); );
@ -63,6 +68,7 @@ Content.propTypes = {
title: PropTypes.string, title: PropTypes.string,
message: PropTypes.string, message: PropTypes.string,
type: PropTypes.string, type: PropTypes.string,
networkShortcut: PropTypes.string,
}; };
export default Content; export default Content;