Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions ui/pages/home/home.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ export default class Home extends PureComponent {
evaluateCohortEligibility: PropTypes.func,
pendingShieldCohort: PropTypes.string,
setPendingShieldCohort: PropTypes.func,
isSignedIn: PropTypes.bool,
};

state = {
Expand Down Expand Up @@ -313,6 +314,7 @@ export default class Home extends PureComponent {
pendingShieldCohort,
evaluateCohortEligibility,
setPendingShieldCohort,
isSignedIn,
} = this.props;

const {
Expand All @@ -338,8 +340,8 @@ export default class Home extends PureComponent {
this.checkStatusAndNavigate();
}

// Check for pending Shield cohort evaluation
if (pendingShieldCohort && evaluateCohortEligibility) {
// Check for pending Shield cohort evaluation if user is signed in
if (pendingShieldCohort && evaluateCohortEligibility && isSignedIn) {
setPendingShieldCohort(null);
evaluateCohortEligibility(pendingShieldCohort);
}
Expand Down
1 change: 1 addition & 0 deletions ui/pages/home/home.container.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ const mapStateToProps = (state) => {
showShieldEntryModal: getShowShieldEntryModal(state),
isSocialLoginFlow: getIsSocialLoginFlow(state),
pendingShieldCohort: getPendingShieldCohort(state),
isSignedIn: state.metamask.isSignedIn,
};
};

Expand Down
Loading