diff options
author | Dan <danjm.com@gmail.com> | 2017-12-07 12:48:41 +0800 |
---|---|---|
committer | Alexander Tseung <alextsg@gmail.com> | 2018-02-01 10:26:26 +0800 |
commit | f38675c9ac99d966b39e3faccd2bf8d7facea9dc (patch) | |
tree | 445cba1d90ccfcd6524c00a892f68755f53d3257 /ui | |
parent | 4f1fe1da6295902e3e0fee633444f84f61f28449 (diff) | |
download | tangerine-wallet-browser-f38675c9ac99d966b39e3faccd2bf8d7facea9dc.tar tangerine-wallet-browser-f38675c9ac99d966b39e3faccd2bf8d7facea9dc.tar.gz tangerine-wallet-browser-f38675c9ac99d966b39e3faccd2bf8d7facea9dc.tar.bz2 tangerine-wallet-browser-f38675c9ac99d966b39e3faccd2bf8d7facea9dc.tar.lz tangerine-wallet-browser-f38675c9ac99d966b39e3faccd2bf8d7facea9dc.tar.xz tangerine-wallet-browser-f38675c9ac99d966b39e3faccd2bf8d7facea9dc.tar.zst tangerine-wallet-browser-f38675c9ac99d966b39e3faccd2bf8d7facea9dc.zip |
Checks if there is currently a send in progress before redirecting to default in conf-tx
Diffstat (limited to 'ui')
-rw-r--r-- | ui/app/conf-tx.js | 10 |
1 files changed, 7 insertions, 3 deletions
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) } } |