From f38675c9ac99d966b39e3faccd2bf8d7facea9dc Mon Sep 17 00:00:00 2001 From: Dan Date: Thu, 7 Dec 2017 01:18:41 -0330 Subject: Checks if there is currently a send in progress before redirecting to default in conf-tx --- ui/app/conf-tx.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'ui/app') diff --git a/ui/app/conf-tx.js b/ui/app/conf-tx.js index 913563d12..9a323e6c2 100644 --- a/ui/app/conf-tx.js +++ b/ui/app/conf-tx.js @@ -44,6 +44,7 @@ function mapStateToProps (state) { computedBalances: state.metamask.computedBalances, unapprovedMsgCount, unapprovedPersonalMsgCount, + send: state.metamask.send, } } @@ -53,15 +54,18 @@ function ConfirmTxScreen () { } ConfirmTxScreen.prototype.componentWillMount = function () { - const { unapprovedTxs = {} } = this.props - if (Object.keys(unapprovedTxs).length === 0) { + const { unapprovedTxs = {}, send } = this.props + const { to } = send + if (Object.keys(unapprovedTxs).length === 0 && !to) { this.props.history.push(DEFAULT_ROUTE) } } ConfirmTxScreen.prototype.componentWillReceiveProps = function (nextProps) { + const { send } = this.props + const { to } = send const { unapprovedTxs = {} } = nextProps - if (Object.keys(unapprovedTxs).length === 0) { + if (Object.keys(unapprovedTxs).length === 0 && !to) { this.props.history.push(DEFAULT_ROUTE) } } -- cgit