// @flow import React from 'react' import { compose } from 'redux' import { connect } from 'react-redux' import { translate } from 'react-i18next' import noop from 'lodash/noop' import type { MapStateToProps } from 'react-redux' import type { T, Accounts, Account } from 'types/common' import { formatBTC } from 'helpers/format' import { getVisibleAccounts } from 'reducers/accounts' import Select from 'components/base/Select' import Box from 'components/base/Box' import Text from 'components/base/Text' const mapStateToProps: MapStateToProps<*, *, *> = state => ({ accounts: getVisibleAccounts(state), }) const renderItem = item => ( {item.name} {formatBTC(item.balance)} ) type Props = { accounts: Accounts, onChange?: () => Account | void, value?: Account | null, t: T, } export const SelectAccount = ({ accounts, onChange, value, t }: Props) => (