Skip to content

Commit d28f9db

Browse files
committed
fix: fixed evaluateCohortEligibility call in home page
1 parent 76c67d6 commit d28f9db

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

ui/pages/home/home.component.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ export default class Home extends PureComponent {
177177
evaluateCohortEligibility: PropTypes.func,
178178
pendingShieldCohort: PropTypes.string,
179179
setPendingShieldCohort: PropTypes.func,
180+
isSignedIn: PropTypes.bool,
180181
};
181182

182183
state = {
@@ -313,6 +314,7 @@ export default class Home extends PureComponent {
313314
pendingShieldCohort,
314315
evaluateCohortEligibility,
315316
setPendingShieldCohort,
317+
isSignedIn,
316318
} = this.props;
317319

318320
const {
@@ -338,8 +340,8 @@ export default class Home extends PureComponent {
338340
this.checkStatusAndNavigate();
339341
}
340342

341-
// Check for pending Shield cohort evaluation
342-
if (pendingShieldCohort && evaluateCohortEligibility) {
343+
// Check for pending Shield cohort evaluation if user is signed in
344+
if (pendingShieldCohort && evaluateCohortEligibility && isSignedIn) {
343345
setPendingShieldCohort(null);
344346
evaluateCohortEligibility(pendingShieldCohort);
345347
}

ui/pages/home/home.container.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ const mapStateToProps = (state) => {
196196
showShieldEntryModal: getShowShieldEntryModal(state),
197197
isSocialLoginFlow: getIsSocialLoginFlow(state),
198198
pendingShieldCohort: getPendingShieldCohort(state),
199+
isSignedIn: state.metamask.isSignedIn,
199200
};
200201
};
201202

0 commit comments

Comments
 (0)