diff --git a/packages/fether-react/src/Accounts/CreateAccount/AccountName/AccountName.js b/packages/fether-react/src/Accounts/CreateAccount/AccountName/AccountName.js index 51e584aa404990482eb624afc81e12f2b0cc23b9..61fa9e20805b1d22343e6590dade05957dd07f24 100644 --- a/packages/fether-react/src/Accounts/CreateAccount/AccountName/AccountName.js +++ b/packages/fether-react/src/Accounts/CreateAccount/AccountName/AccountName.js @@ -56,8 +56,8 @@ class AccountName extends Component {
{!!address && }
-
-
diff --git a/packages/fether-react/src/Send/Sent/Sent.js b/packages/fether-react/src/Send/Sent/Sent.js index f2f6888a2206e77a0b0a0d5554d6e5cb33904d5c..ee300685e60d01d3e0289f832b343a3f8759264c 100644 --- a/packages/fether-react/src/Send/Sent/Sent.js +++ b/packages/fether-react/src/Send/Sent/Sent.js @@ -7,7 +7,6 @@ import React, { Component } from 'react'; import { chainName$ } from '@parity/light.js'; import { inject, observer } from 'mobx-react'; import light from 'light-hoc'; -import { Link } from 'react-router-dom'; import check from '../../assets/img/icons/check.svg'; import loading from '../../assets/img/icons/loading.svg'; @@ -21,6 +20,12 @@ const MIN_CONFIRMATIONS = 6; @inject('sendStore') @observer class Sent extends Component { + handleGoToHomepage = () => { + const { history, sendStore } = this.props; + sendStore.clear(); + history.push('/'); + }; + render () { const { sendStore: { confirmations } @@ -40,11 +45,13 @@ class Sent extends Component { {confirmations >= MIN_CONFIRMATIONS && ( )} diff --git a/packages/fether-react/src/Send/Signer/Signer.js b/packages/fether-react/src/Send/Signer/Signer.js index c70f204fc8d814d577177f1fc3be2a5affec0a3d..3793ed5dcc3e3ad41828d0a2ac8bb9463e90a69d 100644 --- a/packages/fether-react/src/Send/Signer/Signer.js +++ b/packages/fether-react/src/Send/Signer/Signer.js @@ -29,7 +29,7 @@ class Signer extends Component { this.setState({ isSending: true }, () => { sendStore - .acceptRequest(password) + .send(password) .then(() => history.push('/send/sent')) .catch(error => { this.setState({ error, isSending: false }, () => @@ -39,28 +39,26 @@ class Signer extends Component { }); }; - handleChangePassword = ({ target: { value } }) => { - this.setState({ error: null, password: value }); + handleCancel = () => { + const { history } = this.props; + history.goBack(); }; - handleReject = () => { - const { history, sendStore } = this.props; - - this.setState({ isSending: true }, () => { - sendStore - .rejectRequest() - .then(() => history.goBack()) - .catch(() => 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 { - sendStore: { token, tx, txStatus } + sendStore: { token, tx } } = this.props; const { error, isSending, password } = this.state; @@ -112,7 +110,7 @@ class Signer extends Component {