1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-11-13 20:08:56 +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) {
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,
};
}

View File

@ -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,
}) => (
<Wrapper>
@ -54,6 +56,9 @@ const Content = ({
{message && <Message>{message}</Message>}
</Loading>
)}
{isLoading && (type === 'fwNotSupported') && (
<FirmwareUnsupported title={title} message={message} networkShortcut={networkShortcut} />
)}
</Wrapper>
);
@ -63,6 +68,7 @@ Content.propTypes = {
title: PropTypes.string,
message: PropTypes.string,
type: PropTypes.string,
networkShortcut: PropTypes.string,
};
export default Content;