FirmwareUpdate target

pull/399/head
Szymon Lesisz 5 years ago
parent 149b07cb2e
commit 2607417583

@ -49,6 +49,14 @@ const StyledP = styled(P)`
text-align: center; text-align: center;
`; `;
const getFirmwareReleaseLink = (device: ?TrezorDevice): string => {
if (!device || !device.firmwareRelease) return 'https://beta-wallet.trezor.io';
const release = device.firmwareRelease;
const url = release.channel === 'beta' ? 'https://beta-wallet.trezor.io/' : 'https://wallet.trezor.io/';
const version = release.version.join('.');
return `${url}?fw=${version}`;
};
const FirmwareUpdate = (props: Props) => ( const FirmwareUpdate = (props: Props) => (
<Wrapper> <Wrapper>
<Image> <Image>
@ -129,7 +137,7 @@ const FirmwareUpdate = (props: Props) => (
</Image> </Image>
<H1>Its time to update your firmware</H1> <H1>Its time to update your firmware</H1>
<StyledP>Please use Bitcoin wallet interface to update your firmware.</StyledP> <StyledP>Please use Bitcoin wallet interface to update your firmware.</StyledP>
<Link href="https://beta-wallet.trezor.io"> <Link href={getFirmwareReleaseLink(props.device)}>
<Button>Take me to the Bitcoin wallet</Button> <Button>Take me to the Bitcoin wallet</Button>
</Link> </Link>
{deviceUtils.isDeviceAccessible(props.device) && ( {deviceUtils.isDeviceAccessible(props.device) && (

Loading…
Cancel
Save