mirror of
https://github.com/trezor/trezor-wallet
synced 2024-11-28 03:08:30 +00:00
custom loader type when coin is not supported by the firmware
This commit is contained in:
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…
Reference in New Issue
Block a user