Skip to content

Commit

Permalink
Ensure that the confirm screen renders before the home screen if ther…
Browse files Browse the repository at this point in the history
…e are unapproved txs.
  • Loading branch information
danjm committed Apr 24, 2019
1 parent 8f7577f commit fe1b940
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ui/app/pages/home/home.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,14 @@ export default class Home extends PureComponent {
if (Object.keys(suggestedTokens).length > 0) {
history.push(CONFIRM_ADD_SUGGESTED_TOKEN_ROUTE)
}

if (unconfirmedTransactionsCount > 0) {
history.push(CONFIRM_TRANSACTION_ROUTE)
}
}

render () {
const {
forgottenPassword,
seedWords,
providerRequests,
unconfirmedTransactionsCount,
} = this.props

// seed words
Expand All @@ -62,6 +59,9 @@ export default class Home extends PureComponent {
)
}

if (unconfirmedTransactionsCount > 0) {
return <Redirect to={{ pathname: CONFIRM_TRANSACTION_ROUTE }} />
}
return (
<div className="main-container">
<div className="account-and-transaction-details">
Expand Down

0 comments on commit fe1b940

Please sign in to comment.