// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // // SPDX-License-Identifier: BSD-3-Clause import React, { Component } from 'react'; import { Field, Form } from 'react-final-form'; import { Form as FetherForm, Header } from 'fether-ui'; import { inject, observer } from 'mobx-react'; import { Link, Redirect } from 'react-router-dom'; import { withProps } from 'recompose'; import TokenBalance from '../../Tokens/TokensList/TokenBalance'; @inject('sendStore', 'tokensStore') @withProps(({ match: { params: { tokenAddress } }, tokensStore }) => ({ token: tokensStore.tokens[tokenAddress] })) @observer class Signer extends Component { handleAccept = values => { const { history, sendStore, token } = this.props; return sendStore .send(values.password) .then(() => history.push(`/send/${token.address}/sent`)) .catch(error => ({ password: error })); }; render () { const { history, sendStore: { tx }, token } = this.props; if (!tx || !token) { return ; } return (
Close } title={token &&

Send {token.name}

} />
,
(

Enter your password to confirm this transaction.

)} /> ]} onClick={null} token={token} />
); } } export default Signer;