diff options
author | Alexander Tseung <alextsg@users.noreply.github.com> | 2018-07-25 02:49:50 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-25 02:49:50 +0800 |
commit | fed9ae0deed5853014cfc76b4314195d477f14f4 (patch) | |
tree | ef81d610e330241215b0b5878adbf3e5d74c8771 /ui/app/components/pages/home.js | |
parent | 653e42cf79f20e57af63f2bcc36cb3c236239e9b (diff) | |
parent | a61227f224e37559c8d6e2c59441b0032633feaf (diff) | |
download | tangerine-wallet-browser-fed9ae0deed5853014cfc76b4314195d477f14f4.tar.gz tangerine-wallet-browser-fed9ae0deed5853014cfc76b4314195d477f14f4.tar.zst tangerine-wallet-browser-fed9ae0deed5853014cfc76b4314195d477f14f4.zip |
Merge pull request #4865 from MetaMask/i4829-close-notifications-from-ui
Close notifications from UI actions
Diffstat (limited to 'ui/app/components/pages/home.js')
-rw-r--r-- | ui/app/components/pages/home.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ui/app/components/pages/home.js b/ui/app/components/pages/home.js index 38aa02dae..5e3fdc9af 100644 --- a/ui/app/components/pages/home.js +++ b/ui/app/components/pages/home.js @@ -27,19 +27,17 @@ const { NOTICE_ROUTE, } = require('../../routes') +const { unconfirmedTransactionsCountSelector } = require('../../selectors/confirm-transaction') + class Home extends Component { componentDidMount () { const { history, - unapprovedTxs = {}, - unapprovedMsgCount = 0, - unapprovedPersonalMsgCount = 0, - unapprovedTypedMessagesCount = 0, + unconfirmedTransactionsCount = 0, } = this.props // unapprovedTxs and unapproved messages - if (Object.keys(unapprovedTxs).length || - unapprovedTypedMessagesCount + unapprovedMsgCount + unapprovedPersonalMsgCount > 0) { + if (unconfirmedTransactionsCount > 0) { history.push(CONFIRM_TRANSACTION_ROUTE) } } @@ -167,6 +165,7 @@ Home.propTypes = { isPopup: PropTypes.bool, isMouseUser: PropTypes.bool, t: PropTypes.func, + unconfirmedTransactionsCount: PropTypes.number, } function mapStateToProps (state) { @@ -230,6 +229,7 @@ function mapStateToProps (state) { // state needed to get account dropdown temporarily rendering from app bar selected, + unconfirmedTransactionsCount: unconfirmedTransactionsCountSelector(state), } } |