/* @flow */ import React, { Component } from 'react'; import TrezorConnect from 'trezor-connect'; import type { State, TrezorDevice } from '~/flowtype'; type Props = { transport: $PropertyType<$ElementType, 'transport'>; disconnectRequest: ?TrezorDevice; } const DisconnectDevice = (props: Props) => { if (!props.disconnectRequest) return null; return (

The private bank in your hands.

TREZOR Wallet is an easy-to-use interface for your TREZOR.

TREZOR Wallet allows you to easily control your funds, manage your balance and initiate transfers.

Unplug { props.disconnectRequest.label } device.

); }; const ConnectHIDDevice = (props: Props) => (

The private bank in your hands.

TREZOR Wallet is an easy-to-use interface for your TREZOR.

TREZOR Wallet allows you to easily control your funds, manage your balance and initiate transfers.

Connect TREZOR to continue

Don't have TREZOR? Get one

); class ConnectWebUsbDevice extends Component { componentDidMount(): void { TrezorConnect.renderWebUSBButton(); } componentDidUpdate() { TrezorConnect.renderWebUSBButton(); } render() { return (

The private bank in your hands.

TREZOR Wallet is an easy-to-use interface for your TREZOR.

TREZOR Wallet allows you to easily control your funds, manage your balance and initiate transfers.

Connect TREZOR

and

Device not recognized? Try installing the TREZOR Bridge. Don't have TREZOR? Get one

); } } const ConnectDevice = (props: Props) => { const { transport, disconnectRequest } = props; if (disconnectRequest) { return ; } if (transport && transport.version.indexOf('webusb') >= 0) { return ; } return ; }; export default ConnectDevice;