1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-22 09:23:21 +01:00

Don’t show ‘What’s new’ pop up to new users (#13886)

This commit is contained in:
VSaric 2022-03-21 18:57:59 +01:00 committed by GitHub
parent 8ef28702f2
commit b797e24b9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 1 deletions

View File

@ -98,6 +98,8 @@ export default class Home extends PureComponent {
setConnectedStatusPopoverHasBeenShown: PropTypes.func,
connectedStatusPopoverHasBeenShown: PropTypes.bool,
defaultHomeActiveTabName: PropTypes.string,
firstTimeFlowType: PropTypes.string,
completedOnboarding: PropTypes.bool,
onTabClick: PropTypes.func.isRequired,
haveSwapsQuotes: PropTypes.bool.isRequired,
showAwaitingSwapScreen: PropTypes.bool.isRequired,
@ -490,6 +492,8 @@ export default class Home extends PureComponent {
hideWhatsNewPopup,
seedPhraseBackedUp,
showRecoveryPhraseReminder,
firstTimeFlowType,
completedOnboarding,
} = this.props;
if (forgottenPassword) {
@ -498,7 +502,11 @@ export default class Home extends PureComponent {
return null;
}
const showWhatsNew = notificationsToShow && showWhatsNewPopup;
const showWhatsNew =
((completedOnboarding && firstTimeFlowType === 'import') ||
!completedOnboarding) &&
notificationsToShow &&
showWhatsNewPopup;
return (
<div className="main-container">

View File

@ -66,6 +66,8 @@ const mapStateToProps = (state) => {
defaultHomeActiveTabName,
swapsState,
dismissSeedBackUpReminder,
firstTimeFlowType,
completedOnboarding,
} = metamask;
const accountBalance = getCurrentEthBalance(state);
const { forgottenPassword, threeBoxLastUpdated } = appState;
@ -112,6 +114,8 @@ const mapStateToProps = (state) => {
totalUnapprovedCount,
connectedStatusPopoverHasBeenShown,
defaultHomeActiveTabName,
firstTimeFlowType,
completedOnboarding,
haveSwapsQuotes: Boolean(Object.values(swapsState.quotes || {}).length),
swapsFetchParams: swapsState.fetchParams,
showAwaitingSwapScreen: swapsState.routeState === 'awaiting',