diff --git a/packages/fether-react/src/App/App.js b/packages/fether-react/src/App/App.js
index 8623d674872e74eb6738b4067d45afd7a4734be6..a624480ff69a9a0ac595a7c64f97bbf696f216a3 100644
--- a/packages/fether-react/src/App/App.js
+++ b/packages/fether-react/src/App/App.js
@@ -14,7 +14,6 @@ import {
import { inject, observer } from 'mobx-react';
import Accounts from '../Accounts';
-import Debug from '../utils/debug';
import Onboarding from '../Onboarding';
import Overlay from '../Overlay';
import Send from '../Send';
@@ -22,7 +21,6 @@ import { STATUS } from '../stores/healthStore';
import Tokens from '../Tokens';
import Whitelist from '../Whitelist';
-const debug = Debug('App');
// Use MemoryRouter for production viewing in file:// protocol
// https://github.com/facebook/create-react-app/issues/3591
const Router =
@@ -31,8 +29,7 @@ const Router =
@inject('healthStore', 'onboardingStore')
@observer
class App extends Component {
- componentDidCatch (err) {
- debug(err.message);
+ componentDidCatch () {
if (process.env.NODE_ENV !== 'development') {
// Redirect to '/' on errors
window.location.href = '/';
diff --git a/packages/fether-react/src/Send/Signer/Signer.js b/packages/fether-react/src/Send/Signer/Signer.js
index b491aee60d4c8541aab1463c463a8a069ae1fcb7..0b9688915a426b6931dd64223a1c19944721cdae 100644
--- a/packages/fether-react/src/Send/Signer/Signer.js
+++ b/packages/fether-react/src/Send/Signer/Signer.js
@@ -4,11 +4,10 @@
// SPDX-License-Identifier: BSD-3-Clause
import React, { Component } from 'react';
-import { findDOMNode } from 'react-dom';
-import { FormField, Header } from 'fether-ui';
+import { Field, Form } from 'react-final-form';
+import { Form as FetherForm, Header } from 'fether-ui';
import { inject, observer } from 'mobx-react';
-import { Link } from 'react-router-dom';
-import ReactTooltip from 'react-tooltip';
+import { Link, Redirect } from 'react-router-dom';
import { withProps } from 'recompose';
import TokenBalance from '../../Tokens/TokensList/TokenBalance';
@@ -26,7 +25,7 @@ class Signer extends Component {
};
handleAccept = event => {
- const { history, sendStore } = this.props;
+ const { history, sendStore, token } = this.props;
const { password } = this.state;
event.preventDefault();
@@ -34,38 +33,27 @@ class Signer extends Component {
this.setState({ isSending: true }, () => {
sendStore
.send(password)
- .then(() => history.push('/send/sent'))
+ .then(() => history.push(`/send/${token.address}/sent`))
.catch(error => {
- this.setState({ error, isSending: false }, () =>
- ReactTooltip.show(findDOMNode(this.tooltip))
- );
+ this.setState({ error, isSending: false });
});
});
};
- handleCancel = () => {
- const { history } = this.props;
- history.goBack();
- };
-
handleChangePassword = ({ target: { value } }) => {
this.setState({ error: null, password: value });
};
- /**
- * TODO All this tooltips refs etc should go inside a React validation
- * library.
- */
- handleTooltipRef = ref => {
- this.tooltip = ref;
- };
-
render () {
const {
+ history,
sendStore: { tx },
token
} = this.props;
- const { error, isSending, password } = this.state;
+
+ if (!tx || !token) {
+ return