// @flow import * as MODALS from 'constants/modal_types'; import { REMOVE } from 'constants/icons'; import React from 'react'; import Button from 'component/button'; import { Form, FormField } from 'component/common/form'; import { Formik } from 'formik'; import { validateSendTx } from 'util/form-validation'; import Card from 'component/common/card'; type DraftTransaction = { address: string, amount: ?number, // So we can use a placeholder in the input }; type Props = { openModal: (id: string, { address: string, amount: number }) => void, balance: number, history: { goBack: () => void }, }; class WalletSend extends React.PureComponent { constructor() { super(); (this: any).handleSubmit = this.handleSubmit.bind(this); } handleSubmit(values: DraftTransaction) { const { openModal } = this.props; const { address, amount } = values; if (amount && address) { const modalProps = { address, amount }; openModal(MODALS.CONFIRM_TRANSACTION, modalProps); } } render() { const { balance, history } = this.props; return ( {__('Send Credits')}