1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 01:47:00 +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, setConnectedStatusPopoverHasBeenShown: PropTypes.func,
connectedStatusPopoverHasBeenShown: PropTypes.bool, connectedStatusPopoverHasBeenShown: PropTypes.bool,
defaultHomeActiveTabName: PropTypes.string, defaultHomeActiveTabName: PropTypes.string,
firstTimeFlowType: PropTypes.string,
completedOnboarding: PropTypes.bool,
onTabClick: PropTypes.func.isRequired, onTabClick: PropTypes.func.isRequired,
haveSwapsQuotes: PropTypes.bool.isRequired, haveSwapsQuotes: PropTypes.bool.isRequired,
showAwaitingSwapScreen: PropTypes.bool.isRequired, showAwaitingSwapScreen: PropTypes.bool.isRequired,
@ -490,6 +492,8 @@ export default class Home extends PureComponent {
hideWhatsNewPopup, hideWhatsNewPopup,
seedPhraseBackedUp, seedPhraseBackedUp,
showRecoveryPhraseReminder, showRecoveryPhraseReminder,
firstTimeFlowType,
completedOnboarding,
} = this.props; } = this.props;
if (forgottenPassword) { if (forgottenPassword) {
@ -498,7 +502,11 @@ export default class Home extends PureComponent {
return null; return null;
} }
const showWhatsNew = notificationsToShow && showWhatsNewPopup; const showWhatsNew =
((completedOnboarding && firstTimeFlowType === 'import') ||
!completedOnboarding) &&
notificationsToShow &&
showWhatsNewPopup;
return ( return (
<div className="main-container"> <div className="main-container">

View File

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