From 31d5e727db733d4a7f65242e5947d2619636c2ad Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Fri, 28 Feb 2020 00:07:39 -0400 Subject: [PATCH] Remove unnecessary branch from home render The Home screen had a check for whether the current path is `/confirm-transaction`, but the router wouldn't have routed there if that was the case. This was done in #6501 as a performance improvement, but I suspect this line in particular never worked. --- ui/app/pages/home/home.component.js | 104 +++++++++++++--------------- 1 file changed, 50 insertions(+), 54 deletions(-) diff --git a/ui/app/pages/home/home.component.js b/ui/app/pages/home/home.component.js index 645a224b79dc..580ea5ce7b92 100644 --- a/ui/app/pages/home/home.component.js +++ b/ui/app/pages/home/home.component.js @@ -112,60 +112,56 @@ export default class Home extends PureComponent { query="(min-width: 576px)" render={() => } /> - { !history.location.pathname.match(/^\/confirm-transaction/) - ? ( - - - { - shouldShowSeedPhraseReminder - ? ( - { - if (isPopup) { - global.platform.openExtensionInBrowser(INITIALIZE_BACKUP_SEED_PHRASE_ROUTE) - } else { - history.push(INITIALIZE_BACKUP_SEED_PHRASE_ROUTE) - } - }} - infoText={t('backupApprovalInfo')} - key="home-backupApprovalNotice" - /> - ) - : null - } - { - threeBoxLastUpdated && showRestorePrompt - ? ( - { - restoreFromThreeBox(selectedAddress) - .then(() => { - turnThreeBoxSyncingOn() - }) - }} - onIgnore={() => { - setShowRestorePromptToFalse() - }} - key="home-privacyModeDefault" - /> - ) - : null - } - { - hasDaiV1Token - ? - : null - } - - - ) - : null } + + + { + shouldShowSeedPhraseReminder + ? ( + { + if (isPopup) { + global.platform.openExtensionInBrowser(INITIALIZE_BACKUP_SEED_PHRASE_ROUTE) + } else { + history.push(INITIALIZE_BACKUP_SEED_PHRASE_ROUTE) + } + }} + infoText={t('backupApprovalInfo')} + key="home-backupApprovalNotice" + /> + ) + : null + } + { + threeBoxLastUpdated && showRestorePrompt + ? ( + { + restoreFromThreeBox(selectedAddress) + .then(() => { + turnThreeBoxSyncingOn() + }) + }} + onIgnore={() => { + setShowRestorePromptToFalse() + }} + key="home-privacyModeDefault" + /> + ) + : null + } + { + hasDaiV1Token + ? + : null + } + + )