aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/pages/home.js
diff options
context:
space:
mode:
authorAlexander Tseung <alextsg@gmail.com>2018-04-04 07:59:32 +0800
committerAlexander Tseung <alextsg@gmail.com>2018-04-04 07:59:32 +0800
commitbf38aa6f1d793a0e18e64164a3a735e202ca34d6 (patch)
tree871b578a3626184ebfb949ba73386528603690e5 /ui/app/components/pages/home.js
parent2e9273d2ac349f410e6cbc0d67ef48b3ef68e540 (diff)
downloadtangerine-wallet-browser-bf38aa6f1d793a0e18e64164a3a735e202ca34d6.tar
tangerine-wallet-browser-bf38aa6f1d793a0e18e64164a3a735e202ca34d6.tar.gz
tangerine-wallet-browser-bf38aa6f1d793a0e18e64164a3a735e202ca34d6.tar.bz2
tangerine-wallet-browser-bf38aa6f1d793a0e18e64164a3a735e202ca34d6.tar.lz
tangerine-wallet-browser-bf38aa6f1d793a0e18e64164a3a735e202ca34d6.tar.xz
tangerine-wallet-browser-bf38aa6f1d793a0e18e64164a3a735e202ca34d6.tar.zst
tangerine-wallet-browser-bf38aa6f1d793a0e18e64164a3a735e202ca34d6.zip
Fix transaction confirmations
Diffstat (limited to 'ui/app/components/pages/home.js')
-rw-r--r--ui/app/components/pages/home.js30
1 files changed, 16 insertions, 14 deletions
diff --git a/ui/app/components/pages/home.js b/ui/app/components/pages/home.js
index 177d9b4e7..7857a2a99 100644
--- a/ui/app/components/pages/home.js
+++ b/ui/app/components/pages/home.js
@@ -27,6 +27,22 @@ const {
} = require('../../routes')
class Home extends Component {
+ componentDidMount () {
+ const {
+ history,
+ unapprovedTxs = {},
+ unapprovedMsgCount = 0,
+ unapprovedPersonalMsgCount = 0,
+ unapprovedTypedMessagesCount = 0,
+ } = this.props
+
+ // unapprovedTxs and unapproved messages
+ if (Object.keys(unapprovedTxs).length ||
+ unapprovedTypedMessagesCount + unapprovedMsgCount + unapprovedPersonalMsgCount > 0) {
+ history.push(CONFIRM_TRANSACTION_ROUTE)
+ }
+ }
+
render () {
log.debug('rendering primary')
const {
@@ -36,10 +52,6 @@ class Home extends Component {
currentView,
activeAddress,
seedWords,
- unapprovedTxs = {},
- unapprovedMsgCount = 0,
- unapprovedPersonalMsgCount = 0,
- unapprovedTypedMessagesCount = 0,
} = this.props
// notices
@@ -70,16 +82,6 @@ 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, {