Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
3feccf9
added pna-25 banner
NidhiKJha Nov 21, 2025
85cc83d
added pna25 banner to use boolean logic
NidhiKJha Nov 24, 2025
26e9ed2
updated selector
NidhiKJha Nov 24, 2025
1bfb72b
show banner
NidhiKJha Nov 24, 2025
82adc6d
nit fix
NidhiKJha Nov 24, 2025
330dfdb
locale update
NidhiKJha Nov 24, 2025
d270e72
updated metametrics link
NidhiKJha Nov 24, 2025
3ff5436
nit fix
NidhiKJha Nov 25, 2025
8e6603e
jest update
NidhiKJha Nov 25, 2025
82a81c8
added sentry state
NidhiKJha Nov 25, 2025
26821c2
sentry update
NidhiKJha Nov 25, 2025
c787954
sentry update
NidhiKJha Nov 25, 2025
ba6bbab
lint fix
NidhiKJha Nov 25, 2025
79d3892
nit fix
NidhiKJha Nov 25, 2025
cf8d1dd
Merge branch 'main' into CEUX-713-pna-25
NidhiKJha Nov 25, 2025
9aa85c1
metrics update
NidhiKJha Nov 25, 2025
eed9b2a
lint fix
NidhiKJha Nov 25, 2025
cc388b3
lint fix
NidhiKJha Nov 25, 2025
f3a4bda
Merge branch 'main' into CEUX-713-pna-25
NidhiKJha Nov 26, 2025
8450372
lint fix
NidhiKJha Nov 26, 2025
2386bc4
Merge branch 'main' into CEUX-713-pna-25
NidhiKJha Nov 26, 2025
58a3457
updated state to be boolea
NidhiKJha Nov 26, 2025
4bfd97d
lint fix
NidhiKJha Nov 26, 2025
e6758fc
lint fix
NidhiKJha Nov 26, 2025
971c1d0
added onboarding
NidhiKJha Nov 26, 2025
7b4cf07
added build flag
NidhiKJha Nov 26, 2025
a23ac5d
added pna banner
NidhiKJha Nov 26, 2025
af8f50e
removed unused code
NidhiKJha Nov 27, 2025
395951e
Merge branch 'main' into CEUX-713-pna-25
NidhiKJha Nov 27, 2025
1252cb7
nit fix
NidhiKJha Nov 27, 2025
b70dd38
updated welcome logic
NidhiKJha Nov 27, 2025
7af809a
lint fix
NidhiKJha Nov 27, 2025
5236ca2
added metrics logic to settings
NidhiKJha Nov 27, 2025
ca876f7
Merge branch 'main' into CEUX-713-pna-25
NidhiKJha Nov 27, 2025
7a157ea
updated sentry state
NidhiKJha Nov 27, 2025
bf7d334
Merge branch 'main' into CEUX-713-pna-25
NidhiKJha Nov 28, 2025
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: 6 additions & 0 deletions app/_locales/en/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions app/_locales/en_GB/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions app/scripts/constants/sentry-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ export const SENTRY_BACKGROUND_STATE = {
shieldEndingToastLastClickedOrClosed: true,
shieldPausedToastLastClickedOrClosed: true,
isWalletResetInProgress: false,
pna25Acknowledged: false,
},
MultichainBalancesController: {
balances: false,
Expand Down
4 changes: 4 additions & 0 deletions app/scripts/controllers/app-state-controller.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,7 @@ describe('AppStateController', () => {
"outdatedBrowserWarningLastShown": null,
"pendingShieldCohort": null,
"pendingShieldCohortTxType": null,
"pna25Acknowledged": false,
"popupGasPollTokens": [],
"productTour": "accountIcon",
"recoveryPhraseReminderHasBeenShown": false,
Expand Down Expand Up @@ -883,6 +884,7 @@ describe('AppStateController', () => {
"outdatedBrowserWarningLastShown": null,
"pendingShieldCohort": null,
"pendingShieldCohortTxType": null,
"pna25Acknowledged": false,
"popupGasPollTokens": [],
"productTour": "accountIcon",
"recoveryPhraseReminderHasBeenShown": false,
Expand Down Expand Up @@ -963,6 +965,7 @@ describe('AppStateController', () => {
"onboardingDate": null,
"outdatedBrowserWarningLastShown": null,
"pendingShieldCohortTxType": null,
"pna25Acknowledged": false,
"productTour": "accountIcon",
"recoveryPhraseReminderHasBeenShown": false,
"recoveryPhraseReminderLastShown": 1000,
Expand Down Expand Up @@ -1053,6 +1056,7 @@ describe('AppStateController', () => {
"outdatedBrowserWarningLastShown": null,
"pendingShieldCohort": null,
"pendingShieldCohortTxType": null,
"pna25Acknowledged": false,
"popupGasPollTokens": [],
"productTour": "accountIcon",
"recoveryPhraseReminderHasBeenShown": false,
Expand Down
14 changes: 14 additions & 0 deletions app/scripts/controllers/app-state-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ export type AppStateControllerState = {
networkConnectionBanner: NetworkConnectionBanner;
newPrivacyPolicyToastClickedOrClosed: boolean | null;
newPrivacyPolicyToastShownDate: number | null;
pna25Acknowledged: boolean;
nftsDetectionNoticeDismissed: boolean;
nftsDropdownState: Json;
notificationGasPollTokens: string[];
Expand Down Expand Up @@ -282,6 +283,7 @@ const getDefaultAppStateControllerState = (): AppStateControllerState => ({
lastViewedUserSurvey: null,
newPrivacyPolicyToastClickedOrClosed: null,
newPrivacyPolicyToastShownDate: null,
pna25Acknowledged: false,
nftsDetectionNoticeDismissed: false,
notificationGasPollTokens: [],
onboardingDate: null,
Expand Down Expand Up @@ -479,6 +481,12 @@ const controllerMetadata: StateMetadata<AppStateControllerState> = {
includeInDebugSnapshot: true,
usedInUi: true,
},
pna25Acknowledged: {
includeInStateLogs: true,
persist: true,
includeInDebugSnapshot: true,
usedInUi: true,
},
nftsDetectionNoticeDismissed: {
includeInStateLogs: true,
persist: true,
Expand Down Expand Up @@ -887,6 +895,12 @@ export class AppStateController extends BaseController<
});
}

setPna25Acknowledged(acknowledged: boolean): void {
this.update((state) => {
state.pna25Acknowledged = acknowledged;
});
}

setShieldPausedToastLastClickedOrClosed(time: number): void {
this.update((state) => {
state.shieldPausedToastLastClickedOrClosed = time;
Expand Down
2 changes: 2 additions & 0 deletions app/scripts/metamask-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -2986,6 +2986,8 @@ export default class MetamaskController extends EventEmitter {
appStateController.setShieldEndingToastLastClickedOrClosed.bind(
appStateController,
),
setPna25Acknowledged:
appStateController.setPna25Acknowledged.bind(appStateController),
setAppActiveTab:
appStateController.setAppActiveTab.bind(appStateController),
setDefaultSubscriptionPaymentOptions:
Expand Down
7 changes: 7 additions & 0 deletions builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ buildTypes:
- IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.metamask.io/iframe/10.2.3/index.html
- ACCOUNT_SNAPS_DIRECTORY_URL: https://snaps.metamask.io/account-management
- IS_SIDEPANEL: true
- EXTENSION_UX_PNA25: true
# for seedless onboarding (social login)
- GOOGLE_PROD_CLIENT_ID
- APPLE_PROD_CLIENT_ID
Expand Down Expand Up @@ -69,6 +70,7 @@ buildTypes:
- IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.metamask.io/iframe/10.2.3/index.html
- ACCOUNT_SNAPS_DIRECTORY_URL: https://snaps.metamask.io/account-management
- IS_SIDEPANEL: false
- EXTENSION_UX_PNA25: true
# for seedless onboarding (social login)
- GOOGLE_BETA_CLIENT_ID
- APPLE_BETA_CLIENT_ID
Expand Down Expand Up @@ -103,6 +105,7 @@ buildTypes:
- REJECT_INVALID_SNAPS_PLATFORM_VERSION: true
- IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.metamask.io/iframe/10.2.3/index.html
- ACCOUNT_SNAPS_DIRECTORY_URL: https://snaps.metamask.io/account-management
- EXTENSION_UX_PNA25: true
# for seedless onboarding (social login)
- GOOGLE_EXPERIMENTAL_CLIENT_ID
- APPLE_EXPERIMENTAL_CLIENT_ID
Expand Down Expand Up @@ -138,6 +141,7 @@ buildTypes:
- ACCOUNT_SNAPS_DIRECTORY_URL: https://metamask.github.io/snaps-directory-staging/main/account-management
- EIP_4337_ENTRYPOINT: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789'
- IS_SIDEPANEL: false
- EXTENSION_UX_PNA25: true
# for seedless onboarding (social login)
- GOOGLE_FLASK_CLIENT_ID
- APPLE_FLASK_CLIENT_ID
Expand Down Expand Up @@ -460,3 +464,6 @@ env:
# This should only be used for local testing, and should not be enabled in any
# production builds (including beta and Flask).
- FORCE_PREINSTALLED_SNAPS: 'false'

# PNA25 (Privacy Notice)
- EXTENSION_UX_PNA25: true
2 changes: 2 additions & 0 deletions shared/lib/ui-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ export const SUPPORT_LINK = process.env.SUPPORT_LINK;
export const COINGECKO_LINK = 'https://www.coingecko.com/';
export const CRYPTOCOMPARE_LINK = 'https://www.cryptocompare.com/';
export const PRIVACY_POLICY_LINK = 'https://consensys.io/privacy-policy/';
export const METAMETRICS_SETTINGS_LINK =
'https://support.metamask.io/configure/privacy/how-to-manage-your-metametrics-settings/';
export const SURVEY_LINK = 'https://www.getfeedback.com/r/Oczu1vP0';

// TODO make sure these links are correct
Expand Down
1 change: 1 addition & 0 deletions shared/types/background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ export type ControllerStatePropertiesEnumerated = {
isRampCardClosed: AppStateControllerState['isRampCardClosed'];
newPrivacyPolicyToastClickedOrClosed: AppStateControllerState['newPrivacyPolicyToastClickedOrClosed'];
newPrivacyPolicyToastShownDate: AppStateControllerState['newPrivacyPolicyToastShownDate'];
pna25Acknowledged: AppStateControllerState['pna25Acknowledged'];
// TODO: Fix in https://github.com/MetaMask/metamask-extension/issues/31860
// eslint-disable-next-line @typescript-eslint/naming-convention
hadAdvancedGasFeesSetPriorToMigration92_3: AppStateControllerState['hadAdvancedGasFeesSetPriorToMigration92_3'];
Expand Down
1 change: 1 addition & 0 deletions test/e2e/fixtures/default-fixture.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ function defaultFixture(inputChainId = CHAIN_IDS.LOCALHOST) {
notificationGasPollTokens: [],
popupGasPollTokens: [],
recoveryPhraseReminderHasBeenShown: true,
pna25Acknowledged: false,
recoveryPhraseReminderLastShown:
'__FIXTURE_SUBSTITUTION__currentDateInMilliseconds',
showTestnetMessageInDropdown: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"outdatedBrowserWarningLastShown": "object",
"pendingShieldCohort": null,
"pendingShieldCohortTxType": null,
"pna25Acknowledged": "boolean",
"popupGasPollTokens": "object",
"productTour": "accountIcon",
"recoveryPhraseReminderHasBeenShown": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,6 @@
"shouldShowAggregatedBalancePopover": "boolean"
},
"firstTimeFlowType": "import",
"claims": "object",
"claimsConfigurations": "object",
"completedOnboarding": true,
"knownMethodData": "object",
"use4ByteResolution": true,
Expand All @@ -134,6 +132,7 @@
}
},
"throttledOrigins": "object",
"isSeedlessOnboardingUserAuthenticated": "boolean",
"activeQrCodeScanRequest": null,
"appActiveTab": "object",
"browserEnvironment": { "os": "string", "browser": "string" },
Expand All @@ -145,12 +144,14 @@
"enforcedSimulationsSlippageForTransactions": "object",
"fullScreenGasPollTokens": "object",
"hadAdvancedGasFeesSetPriorToMigration92_3": false,
"canTrackWalletFundsObtained": false,
"isRampCardClosed": false,
"isUpdateAvailable": false,
"lastUpdatedAt": null,
"lastViewedUserSurvey": null,
"newPrivacyPolicyToastClickedOrClosed": "boolean",
"newPrivacyPolicyToastShownDate": "number",
"pna25Acknowledged": "boolean",
"nftsDetectionNoticeDismissed": false,
"notificationGasPollTokens": "object",
"onboardingDate": null,
Expand All @@ -173,14 +174,17 @@
"updateModalLastDismissedAt": null,
"hasShownMultichainAccountsIntroModal": "boolean",
"showShieldEntryModalOnce": "boolean",
"pendingShieldCohort": null,
"pendingShieldCohortTxType": null,
"isWalletResetInProgress": "boolean",
"dappSwapComparisonData": "object",
"addressSecurityAlertResponses": "object",
"currentExtensionPopupId": "number",
"dappSwapComparisonData": "object",
"nftsDropdownState": {},
"signatureSecurityAlertResponses": "object",
"networkConnectionBanner": "object",
"termsOfUseLastAgreed": "number",
"snapsInstallPrivacyWarningShown": true,
"termsOfUseLastAgreed": "number",
"currentAppVersion": "string",
"previousAppVersion": "",
"previousMigrationVersion": 0,
Expand Down Expand Up @@ -214,7 +218,6 @@
"identities": "object",
"ipfsGateway": "string",
"isIpfsGatewayEnabled": "boolean",
"isMultiAccountBalancesEnabled": "boolean",
"ledgerTransportType": "webhid",
"lostIdentities": "object",
"manageInstitutionalWallets": "boolean",
Expand All @@ -229,6 +232,7 @@
"useCurrencyRateCheck": true,
"useExternalNameSources": "boolean",
"useExternalServices": "boolean",
"isMultiAccountBalancesEnabled": "boolean",
"useMultiAccountBalanceChecker": true,
"useNftDetection": false,
"usePhishDetect": true,
Expand All @@ -253,7 +257,6 @@
"seedPhraseBackedUp": true,
"onboardingTabs": "object",
"socialBackupsMetadata": "object",
"isSeedlessOnboardingUserAuthenticated": "boolean",
"subscriptions": "object",
"trialedProducts": "object",
"subjects": "object",
Expand Down Expand Up @@ -328,7 +331,6 @@
"isUpdatingMetamaskNotifications": "boolean",
"isFetchingMetamaskNotifications": "boolean",
"isUpdatingMetamaskNotificationsAccount": "object",
"isWalletResetInProgress": "boolean",
"isCheckingAccountsPresence": "boolean",
"isPushEnabled": "boolean",
"fcmToken": "string",
Expand All @@ -339,19 +341,15 @@
"feature3": { "name": "groupC", "value": "valueC" },
"sendRedesign": { "enabled": false }
},
"rewardsAccounts": "object",
"rewardsActiveAccount": null,
"rewardsSeasonStatuses": "object",
"rewardsSeasons": "object",
"rewardsSubscriptionTokens": "object",
"rewardsSubscriptions": "object",
"cacheTimestamp": "number",
"allDeFiPositions": "object",
"allDeFiPositionsCount": "object",
"urlScanCache": "object",
"tokenScanCache": "object",
"coverageResults": "object",
"orderedTransactionHistory": "object",
"claimsConfigurations": "object",
"claims": "object",
"accountsByChainId": "object",
"unapprovedDecryptMsgs": "object",
"unapprovedDecryptMsgCount": 0,
Expand Down Expand Up @@ -405,9 +403,6 @@
"ensEntries": "object",
"ensResolutionsByAddress": "object",
"pendingApprovals": "object",
"pendingRevocations": "object",
"pendingShieldCohort": null,
"pendingShieldCohortTxType": null,
"pendingApprovalCount": "number",
"approvalFlows": "object",
"storageMetadata": {},
Expand All @@ -420,12 +415,18 @@
"hasAccountTreeSyncingSyncedAtLeastOnce": "boolean",
"accountGroupsMetadata": "object",
"accountWalletsMetadata": "object",
"canTrackWalletFundsObtained": false,
"delegations": "object",
"isGatorPermissionsEnabled": "boolean",
"gatorPermissionsMapSerialized": "string",
"isFetchingGatorPermissions": "boolean",
"gatorPermissionsProviderSnapId": "string",
"pendingRevocations": "object",
"rewardsActiveAccount": null,
"rewardsAccounts": "object",
"rewardsSubscriptions": "object",
"rewardsSeasons": "object",
"rewardsSeasonStatuses": "object",
"rewardsSubscriptionTokens": "object",
"srpSessionData": "object"
},
"ramps": "object",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"showShieldEntryModalOnce": "boolean",
"pendingShieldCohort": null,
"pendingShieldCohortTxType": null,
"pna25Acknowledged": "boolean",
"appActiveTab": "object"
},
"BridgeController": {},
Expand Down
Loading
Loading