custom loader type when coin is not supported by the firmware

pull/278/head
slowbackspace 6 years ago
parent 3566f1b3c5
commit 512574ece2

@ -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,
};
}

@ -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;

Loading…
Cancel
Save