Skip to content

Commit edf9957

Browse files
authored
fix: Show outdated browser warning immediately (#25366)
## **Description** The outdated browser warning logic has been updated to ensure that it gets shown immediately for new installations if applicable. We have a timer setup to ensure we don't bother users too often with this warning; it recurs every two days. However, it was initialized to the current date, so new users would not see it for two days. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/25366?quickstart=1) ## **Related issues** N/A ## **Manual testing steps** Install MetaMask on an outdated browser version, and see that the warning appears. ## **Screenshots/Recordings** N/A ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
1 parent 69ec573 commit edf9957

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

app/scripts/controllers/app-state.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export default class AppStateController extends EventEmitter {
4343
fullScreenGasPollTokens: [],
4444
recoveryPhraseReminderHasBeenShown: false,
4545
recoveryPhraseReminderLastShown: new Date().getTime(),
46-
outdatedBrowserWarningLastShown: new Date().getTime(),
46+
outdatedBrowserWarningLastShown: null,
4747
nftsDetectionNoticeDismissed: false,
4848
showTestnetMessageInDropdown: true,
4949
showBetaHeader: isBeta(),

test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-background-state.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"fullScreenGasPollTokens": "object",
3131
"recoveryPhraseReminderHasBeenShown": true,
3232
"recoveryPhraseReminderLastShown": "number",
33-
"outdatedBrowserWarningLastShown": "number",
33+
"outdatedBrowserWarningLastShown": "object",
3434
"nftsDetectionNoticeDismissed": false,
3535
"showTestnetMessageInDropdown": true,
3636
"showBetaHeader": false,

test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-ui-state.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
"fullScreenGasPollTokens": "object",
6767
"recoveryPhraseReminderHasBeenShown": true,
6868
"recoveryPhraseReminderLastShown": "number",
69-
"outdatedBrowserWarningLastShown": "number",
69+
"outdatedBrowserWarningLastShown": "object",
7070
"nftsDetectionNoticeDismissed": false,
7171
"showTestnetMessageInDropdown": true,
7272
"showBetaHeader": false,

0 commit comments

Comments
 (0)