/* @flow */ import installers from 'constants/bridge'; import React, { Component } from 'react'; import Select from 'react-select'; import Preloader from './Preloader'; type State = { version: string; target: ?InstallTarget; url: string; } type InstallTarget = { id: string; value: string; label: string; } // import type { Props } from './index'; type Props = { browserState: { osname: string, }; } export default class InstallBridge extends Component { constructor(props: Props) { super(props); const currentTarget: ?InstallTarget = installers.find(i => i.id === props.browserState.osname); this.state = { version: '2.0.12', url: 'https://wallet.trezor.io/data/bridge/2.0.12/', target: currentTarget, }; } componentWillUpdate() { if (this.props.browserState.osname && !this.state.target) { const currentTarget: ?InstallTarget = installers.find(i => i.id === this.props.browserState.osname); this.setState({ target: currentTarget, }); } } onChange(value: InstallTarget) { this.setState({ target: value, }); } render() { if (!this.state.target) { return ; } const label: string = this.state.target.label; const url = `${this.state.url}${this.state.target.value}`; return (

TREZOR Bridge. Version 2.0.12

New communication tool to facilitate the connection between your TREZOR and your internet browser.