From 4fcc18a771539f25a11f8b6f4debd522994a1e7b Mon Sep 17 00:00:00 2001 From: Dan Miller Date: Wed, 11 Sep 2019 21:52:16 -0230 Subject: [PATCH] Prevent threebox notification from showing if feature flag is falsy --- ui/app/pages/home/home.component.js | 4 +++- ui/app/pages/home/home.container.js | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ui/app/pages/home/home.component.js b/ui/app/pages/home/home.component.js index 06164691ae44..8b7487322f99 100644 --- a/ui/app/pages/home/home.component.js +++ b/ui/app/pages/home/home.component.js @@ -43,6 +43,7 @@ export default class Home extends PureComponent { restoreFromThreeBox: PropTypes.func, setRestoredFromThreeBoxToFalse: PropTypes.func, threeBoxLastUpdated: PropTypes.string, + threeBoxFeatureFlagIsTrue: PropTypes.bool, } componentWillMount () { @@ -96,6 +97,7 @@ export default class Home extends PureComponent { setRestoredFromThreeBoxToFalse, restoredFromThreeBox, threeBoxLastUpdated, + threeBoxFeatureFlagIsTrue, } = this.props if (forgottenPassword) { @@ -153,7 +155,7 @@ export default class Home extends PureComponent { />, }, { - shouldBeRendered: threeBoxLastUpdated && restoredFromThreeBox === null, + shouldBeRendered: threeBoxFeatureFlagIsTrue && threeBoxLastUpdated && restoredFromThreeBox === null, component: { threeBoxSynced, restoredFromThreeBox, selectedAddress, + featureFlags, } = metamask const accountBalance = getCurrentEthBalance(state) const { forgottenPassword, threeBoxLastUpdated } = appState @@ -44,6 +45,7 @@ const mapStateToProps = state => { restoredFromThreeBox, selectedAddress, threeBoxLastUpdated, + threeBoxFeatureFlagIsTrue: featureFlags.threeBox, } }