diff options
author | Alexander Tseung <alextsg@gmail.com> | 2018-04-03 16:03:31 +0800 |
---|---|---|
committer | Alexander Tseung <alextsg@gmail.com> | 2018-04-03 16:03:31 +0800 |
commit | 35875863d2feafc1f653e17e0f58efc2f18ddc46 (patch) | |
tree | 5d40581a08201b3f37c7b31fe2aab4675d827f6b /ui/app/components/pages | |
parent | 516c1869b0f366a42282a66e14185ce630f883dd (diff) | |
parent | c14ec4191741c444dcf5b7c3e177c17a10374c16 (diff) | |
download | tangerine-wallet-browser-35875863d2feafc1f653e17e0f58efc2f18ddc46.tar tangerine-wallet-browser-35875863d2feafc1f653e17e0f58efc2f18ddc46.tar.gz tangerine-wallet-browser-35875863d2feafc1f653e17e0f58efc2f18ddc46.tar.bz2 tangerine-wallet-browser-35875863d2feafc1f653e17e0f58efc2f18ddc46.tar.lz tangerine-wallet-browser-35875863d2feafc1f653e17e0f58efc2f18ddc46.tar.xz tangerine-wallet-browser-35875863d2feafc1f653e17e0f58efc2f18ddc46.tar.zst tangerine-wallet-browser-35875863d2feafc1f653e17e0f58efc2f18ddc46.zip |
Fix merge conflicts. Modify send workflow
Diffstat (limited to 'ui/app/components/pages')
-rw-r--r-- | ui/app/components/pages/home.js | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/ui/app/components/pages/home.js b/ui/app/components/pages/home.js index ffe35a2a8..177d9b4e7 100644 --- a/ui/app/components/pages/home.js +++ b/ui/app/components/pages/home.js @@ -27,21 +27,6 @@ const { } = require('../../routes') class Home extends Component { - componentDidMount () { - const { - unapprovedTxs = {}, - unapprovedMsgCount = 0, - unapprovedPersonalMsgCount = 0, - unapprovedTypedMessagesCount = 0, - } = this.props - - // unapprovedTxs and unapproved messages - if (Object.keys(unapprovedTxs).length || - unapprovedTypedMessagesCount + unapprovedMsgCount + unapprovedPersonalMsgCount > 0) { - this.props.history.push(CONFIRM_TRANSACTION_ROUTE) - } - } - render () { log.debug('rendering primary') const { @@ -51,6 +36,10 @@ class Home extends Component { currentView, activeAddress, seedWords, + unapprovedTxs = {}, + unapprovedMsgCount = 0, + unapprovedPersonalMsgCount = 0, + unapprovedTypedMessagesCount = 0, } = this.props // notices @@ -81,6 +70,16 @@ class Home extends Component { }) } + // unapprovedTxs and unapproved messages + if (Object.keys(unapprovedTxs).length || + unapprovedTypedMessagesCount + unapprovedMsgCount + unapprovedPersonalMsgCount > 0) { + return h(Redirect, { + to: { + pathname: CONFIRM_TRANSACTION_ROUTE, + }, + }) + } + // if (!props.noActiveNotices) { // log.debug('rendering notice screen for unread notices.') // return h(NoticeScreen, { |