/* @flow */ 'use strict'; import React from 'react'; import { findAccount } from '../../reducers/AccountsReducer'; import { findSelectedDevice } from '../../reducers/TrezorConnectReducer'; import type { Props } from './index'; const ConfirmAddress = (props: Props) => { const { accounts, abstractAccount } = props; if (!abstractAccount) return null; const account = findAccount(accounts, abstractAccount.index, abstractAccount.deviceState, abstractAccount.network); if (!account) return null; return (

Confirm address on TREZOR

Please compare your address on device with address shown bellow.

{ account.address }

); } export default ConfirmAddress; export const ConfirmUnverifiedAddress = (props: Props): any => { if (!props.modal.opened) return null; const { device } = props.modal; const { accounts, abstractAccount } = props; const { onCancel } = props.modalActions; const { showUnverifiedAddress, showAddress } = props.receiveActions; if(!abstractAccount) return null; const account = findAccount(accounts, abstractAccount.index, abstractAccount.deviceState, abstractAccount.network); if (!account) return null; if (!device.connected) { return (

{ device.instanceLabel } is not connected

To prevent phishing attacks, you should verify the address on your TREZOR first. Please reconnect your device to continue with the verification process.

); } else { // corner-case where device is connected but it is unavailable because it was created with different "passphrase_protection" settings const enable: string = device.features && device.features.passphrase_protection ? 'Enable' : 'Disable'; return (

{ device.instanceLabel } is unavailable

To prevent phishing attacks, you should verify the address on your TREZOR first. { enable } passphrase settings to continue with the verification process.

); } }