Skip to content

Commit 21bfcd8

Browse files
authored
Merge branch 'main' into enable-spot-prices-v3
2 parents 8991dbd + ead303c commit 21bfcd8

File tree

29 files changed

+441
-200
lines changed

29 files changed

+441
-200
lines changed

app/_locales/en/messages.json

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/_locales/en_GB/messages.json

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/scripts/constants/sentry-state.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ export const SENTRY_BACKGROUND_STATE = {
9393
shieldEndingToastLastClickedOrClosed: true,
9494
shieldPausedToastLastClickedOrClosed: true,
9595
isWalletResetInProgress: false,
96+
pna25Acknowledged: false,
9697
},
9798
MultichainBalancesController: {
9899
balances: false,

app/scripts/controllers/app-state-controller.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -792,6 +792,7 @@ describe('AppStateController', () => {
792792
"outdatedBrowserWarningLastShown": null,
793793
"pendingShieldCohort": null,
794794
"pendingShieldCohortTxType": null,
795+
"pna25Acknowledged": false,
795796
"popupGasPollTokens": [],
796797
"productTour": "accountIcon",
797798
"recoveryPhraseReminderHasBeenShown": false,
@@ -883,6 +884,7 @@ describe('AppStateController', () => {
883884
"outdatedBrowserWarningLastShown": null,
884885
"pendingShieldCohort": null,
885886
"pendingShieldCohortTxType": null,
887+
"pna25Acknowledged": false,
886888
"popupGasPollTokens": [],
887889
"productTour": "accountIcon",
888890
"recoveryPhraseReminderHasBeenShown": false,
@@ -963,6 +965,7 @@ describe('AppStateController', () => {
963965
"onboardingDate": null,
964966
"outdatedBrowserWarningLastShown": null,
965967
"pendingShieldCohortTxType": null,
968+
"pna25Acknowledged": false,
966969
"productTour": "accountIcon",
967970
"recoveryPhraseReminderHasBeenShown": false,
968971
"recoveryPhraseReminderLastShown": 1000,
@@ -1053,6 +1056,7 @@ describe('AppStateController', () => {
10531056
"outdatedBrowserWarningLastShown": null,
10541057
"pendingShieldCohort": null,
10551058
"pendingShieldCohortTxType": null,
1059+
"pna25Acknowledged": false,
10561060
"popupGasPollTokens": [],
10571061
"productTour": "accountIcon",
10581062
"recoveryPhraseReminderHasBeenShown": false,

app/scripts/controllers/app-state-controller.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ export type AppStateControllerState = {
114114
networkConnectionBanner: NetworkConnectionBanner;
115115
newPrivacyPolicyToastClickedOrClosed: boolean | null;
116116
newPrivacyPolicyToastShownDate: number | null;
117+
pna25Acknowledged: boolean;
117118
nftsDetectionNoticeDismissed: boolean;
118119
nftsDropdownState: Json;
119120
notificationGasPollTokens: string[];
@@ -282,6 +283,7 @@ const getDefaultAppStateControllerState = (): AppStateControllerState => ({
282283
lastViewedUserSurvey: null,
283284
newPrivacyPolicyToastClickedOrClosed: null,
284285
newPrivacyPolicyToastShownDate: null,
286+
pna25Acknowledged: false,
285287
nftsDetectionNoticeDismissed: false,
286288
notificationGasPollTokens: [],
287289
onboardingDate: null,
@@ -479,6 +481,12 @@ const controllerMetadata: StateMetadata<AppStateControllerState> = {
479481
includeInDebugSnapshot: true,
480482
usedInUi: true,
481483
},
484+
pna25Acknowledged: {
485+
includeInStateLogs: true,
486+
persist: true,
487+
includeInDebugSnapshot: true,
488+
usedInUi: true,
489+
},
482490
nftsDetectionNoticeDismissed: {
483491
includeInStateLogs: true,
484492
persist: true,
@@ -887,6 +895,12 @@ export class AppStateController extends BaseController<
887895
});
888896
}
889897

898+
setPna25Acknowledged(acknowledged: boolean): void {
899+
this.update((state) => {
900+
state.pna25Acknowledged = acknowledged;
901+
});
902+
}
903+
890904
setShieldPausedToastLastClickedOrClosed(time: number): void {
891905
this.update((state) => {
892906
state.shieldPausedToastLastClickedOrClosed = time;

app/scripts/metamask-controller.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2986,6 +2986,8 @@ export default class MetamaskController extends EventEmitter {
29862986
appStateController.setShieldEndingToastLastClickedOrClosed.bind(
29872987
appStateController,
29882988
),
2989+
setPna25Acknowledged:
2990+
appStateController.setPna25Acknowledged.bind(appStateController),
29892991
setAppActiveTab:
29902992
appStateController.setAppActiveTab.bind(appStateController),
29912993
setDefaultSubscriptionPaymentOptions:

builds.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ buildTypes:
3535
- IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.metamask.io/iframe/10.2.3/index.html
3636
- ACCOUNT_SNAPS_DIRECTORY_URL: https://snaps.metamask.io/account-management
3737
- IS_SIDEPANEL: true
38+
- EXTENSION_UX_PNA25: true
3839
# for seedless onboarding (social login)
3940
- GOOGLE_PROD_CLIENT_ID
4041
- APPLE_PROD_CLIENT_ID
@@ -69,6 +70,7 @@ buildTypes:
6970
- IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.metamask.io/iframe/10.2.3/index.html
7071
- ACCOUNT_SNAPS_DIRECTORY_URL: https://snaps.metamask.io/account-management
7172
- IS_SIDEPANEL: false
73+
- EXTENSION_UX_PNA25: true
7274
# for seedless onboarding (social login)
7375
- GOOGLE_BETA_CLIENT_ID
7476
- APPLE_BETA_CLIENT_ID
@@ -103,6 +105,7 @@ buildTypes:
103105
- REJECT_INVALID_SNAPS_PLATFORM_VERSION: true
104106
- IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.metamask.io/iframe/10.2.3/index.html
105107
- ACCOUNT_SNAPS_DIRECTORY_URL: https://snaps.metamask.io/account-management
108+
- EXTENSION_UX_PNA25: true
106109
# for seedless onboarding (social login)
107110
- GOOGLE_EXPERIMENTAL_CLIENT_ID
108111
- APPLE_EXPERIMENTAL_CLIENT_ID
@@ -138,6 +141,7 @@ buildTypes:
138141
- ACCOUNT_SNAPS_DIRECTORY_URL: https://metamask.github.io/snaps-directory-staging/main/account-management
139142
- EIP_4337_ENTRYPOINT: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789'
140143
- IS_SIDEPANEL: false
144+
- EXTENSION_UX_PNA25: true
141145
# for seedless onboarding (social login)
142146
- GOOGLE_FLASK_CLIENT_ID
143147
- APPLE_FLASK_CLIENT_ID
@@ -460,3 +464,6 @@ env:
460464
# This should only be used for local testing, and should not be enabled in any
461465
# production builds (including beta and Flask).
462466
- FORCE_PREINSTALLED_SNAPS: 'false'
467+
468+
# PNA25 (Privacy Notice)
469+
- EXTENSION_UX_PNA25: true

shared/lib/ui-utils.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ export const SUPPORT_LINK = process.env.SUPPORT_LINK;
55
export const COINGECKO_LINK = 'https://www.coingecko.com/';
66
export const CRYPTOCOMPARE_LINK = 'https://www.cryptocompare.com/';
77
export const PRIVACY_POLICY_LINK = 'https://consensys.io/privacy-policy/';
8+
export const METAMETRICS_SETTINGS_LINK =
9+
'https://support.metamask.io/configure/privacy/how-to-manage-your-metametrics-settings/';
810
export const SURVEY_LINK = 'https://www.getfeedback.com/r/Oczu1vP0';
911

1012
// TODO make sure these links are correct

shared/types/background.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ export type ControllerStatePropertiesEnumerated = {
117117
isRampCardClosed: AppStateControllerState['isRampCardClosed'];
118118
newPrivacyPolicyToastClickedOrClosed: AppStateControllerState['newPrivacyPolicyToastClickedOrClosed'];
119119
newPrivacyPolicyToastShownDate: AppStateControllerState['newPrivacyPolicyToastShownDate'];
120+
pna25Acknowledged: AppStateControllerState['pna25Acknowledged'];
120121
// TODO: Fix in https://github.com/MetaMask/metamask-extension/issues/31860
121122
// eslint-disable-next-line @typescript-eslint/naming-convention
122123
hadAdvancedGasFeesSetPriorToMigration92_3: AppStateControllerState['hadAdvancedGasFeesSetPriorToMigration92_3'];

test/e2e/fixtures/default-fixture.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ function defaultFixture(inputChainId = CHAIN_IDS.LOCALHOST) {
113113
notificationGasPollTokens: [],
114114
popupGasPollTokens: [],
115115
recoveryPhraseReminderHasBeenShown: true,
116+
pna25Acknowledged: false,
116117
recoveryPhraseReminderLastShown:
117118
'__FIXTURE_SUBSTITUTION__currentDateInMilliseconds',
118119
showTestnetMessageInDropdown: true,

0 commit comments

Comments
 (0)