Skip to content

Commit

Permalink
Merge pull request #25330 from MetaMask/Version-v11.16.12
Browse files Browse the repository at this point in the history
Version v11.16.12
  • Loading branch information
danjm authored Jun 17, 2024
2 parents 74f05d7 + 3e8ce07 commit ed0cc1e
Show file tree
Hide file tree
Showing 28 changed files with 705 additions and 11 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [11.16.12]

## [11.16.11]
### Fixed
- Ensure network requests for phishing lists are not sent if the Basic Functionality Toggle is off ([#25306](https://github.com/MetaMask/metamask-extension/pull/25306))
Expand Down Expand Up @@ -4812,7 +4814,8 @@ Update styles and spacing on the critical error page ([#20350](https://github.c
- Added the ability to restore accounts from seed words.


[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v11.16.11...HEAD
[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v11.16.12...HEAD
[11.16.12]: https://github.com/MetaMask/metamask-extension/compare/v11.16.11...v11.16.12
[11.16.11]: https://github.com/MetaMask/metamask-extension/compare/v11.16.10...v11.16.11
[11.16.10]: https://github.com/MetaMask/metamask-extension/compare/v11.16.9...v11.16.10
[11.16.9]: https://github.com/MetaMask/metamask-extension/compare/v11.16.8...v11.16.9
Expand Down
46 changes: 46 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.

11 changes: 11 additions & 0 deletions app/scripts/controllers/metametrics.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ export default class MetaMetricsController {
this.store = new ObservableStore({
participateInMetaMetrics: null,
metaMetricsId: null,
dataCollectionForMarketing: null,
eventsBeforeMetricsOptIn: [],
traits: {},
previousUserTraits: {},
Expand Down Expand Up @@ -475,6 +476,12 @@ export default class MetaMetricsController {
return metaMetricsId;
}

setDataCollectionForMarketing(dataCollectionForMarketing) {
const { metaMetricsId } = this.state;
this.store.updateState({ dataCollectionForMarketing });
return metaMetricsId;
}

get state() {
return this.store.getState();
}
Expand Down Expand Up @@ -818,6 +825,10 @@ export default class MetaMetricsController {
metamaskState.securityAlertsEnabled ? ['blockaid'] : [],
[MetaMetricsUserTrait.PetnameAddressCount]:
this._getPetnameAddressCount(metamaskState),
[MetaMetricsUserTrait.IsMetricsOptedIn]:
metamaskState.participateInMetaMetrics,
[MetaMetricsUserTrait.HasMarketingConsent]:
metamaskState.dataCollectionForMarketing,
};

if (!previousUserTraits) {
Expand Down
1 change: 1 addition & 0 deletions app/scripts/lib/setupSentry.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ export const SENTRY_BACKGROUND_STATE = {
previousUserTraits: false,
segmentApiCalls: false,
traits: false,
dataCollectionForMarketing: false,
},
NameController: {
names: false,
Expand Down
4 changes: 4 additions & 0 deletions app/scripts/metamask-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -2990,6 +2990,10 @@ export default class MetamaskController extends EventEmitter {
metaMetricsController.setParticipateInMetaMetrics.bind(
metaMetricsController,
),
setDataCollectionForMarketing:
metaMetricsController.setDataCollectionForMarketing.bind(
metaMetricsController,
),
setCurrentLocale: preferencesController.setCurrentLocale.bind(
preferencesController,
),
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "metamask-crx",
"version": "11.16.11",
"version": "11.16.12",
"private": true,
"repository": {
"type": "git",
Expand Down
9 changes: 9 additions & 0 deletions shared/constants/metametrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,14 @@ export type MetaMetricsUserTraits = {
};

export enum MetaMetricsUserTrait {
/**
* Identifies if the user has opted in for MetaMetrics
*/
IsMetricsOptedIn = 'is_metrics_opted_in',
/**
* Identifies is the user has given marketing consent
*/
HasMarketingConsent = 'has_marketing_consent',
/**
* Identified when the user adds or modifies addresses in the address book.
*/
Expand Down Expand Up @@ -505,6 +513,7 @@ export enum MetaMetricsEventName {
AccountRenamed = 'Account Renamed',
ActivityDetailsOpened = 'Activity Details Opened',
ActivityDetailsClosed = 'Activity Details Closed',
AnalyticsPreferenceSelected = 'Analytics Preference Selected',
AppInstalled = 'App Installed',
AppUnlocked = 'App Unlocked',
AppUnlockedFailed = 'App Unlocked Failed',
Expand Down
1 change: 1 addition & 0 deletions test/e2e/fixture-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ function defaultFixture(inputChainId = CHAIN_IDS.LOCALHOST) {
fragments: {},
metaMetricsId: null,
participateInMetaMetrics: false,
dataCollectionForMarketing: false,
traits: {},
},
NetworkController: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
"traits": "object",
"previousUserTraits": "object",
"fragments": "object",
"dataCollectionForMarketing": "boolean",
"segmentApiCalls": "object"
},
"NameController": { "names": "object", "nameSources": "object" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"knownMethodData": "object",
"use4ByteResolution": true,
"participateInMetaMetrics": true,
"dataCollectionForMarketing": "boolean",
"nextNonce": null,
"currencyRates": {
"ETH": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"fragments": "object",
"metaMetricsId": "fake-metrics-id",
"participateInMetaMetrics": true,
"dataCollectionForMarketing": "boolean",
"traits": "object"
},
"NetworkController": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"fragments": "object",
"metaMetricsId": "fake-metrics-id",
"participateInMetaMetrics": true,
"dataCollectionForMarketing": "boolean",
"traits": "object"
},
"NetworkController": {
Expand Down
4 changes: 4 additions & 0 deletions ui/components/ui/popover/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
&__title--center {
flex: 1;
}

&__title-wrap {
white-space: normal;
}
}

&-bg {
Expand Down
6 changes: 6 additions & 0 deletions ui/components/ui/popover/popover.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ const Popover = ({
showScrollDown,
onScrollDownButtonClick,
centerTitle,
wrapTitle,
headerProps = defaultHeaderProps,
contentProps = defaultContentProps,
footerProps = defaultFooterProps,
Expand Down Expand Up @@ -106,6 +107,7 @@ const Popover = ({
) : null}
<Text
textAlign={centerTitle ? TextAlign.Center : TextAlign.Start}
className={wrapTitle ? 'popover-header__title-wrap' : null}
ellipsis
variant={TextVariant.headingSm}
as="h2"
Expand Down Expand Up @@ -184,6 +186,10 @@ const Popover = ({
};

Popover.propTypes = {
/**
* Avoid wrapping title
*/
wrapTitle: PropTypes.bool,
/**
* Show title of the popover
*/
Expand Down
7 changes: 7 additions & 0 deletions ui/ducks/metamask/metamask.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ const initialState = {
knownMethodData: {},
use4ByteResolution: true,
participateInMetaMetrics: null,
dataCollectionForMarketing: null,
nextNonce: null,
currencyRates: {
ETH: {
Expand Down Expand Up @@ -162,6 +163,12 @@ export default function reduceMetamask(state = initialState, action) {
participateInMetaMetrics: action.value,
};

case actionConstants.SET_DATA_COLLECTION_FOR_MARKETING:
return {
...metamaskState,
dataCollectionForMarketing: action.value,
};

case actionConstants.CLOSE_WELCOME_SCREEN:
return {
...metamaskState,
Expand Down
3 changes: 3 additions & 0 deletions ui/helpers/constants/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ const _mmiWebSite = 'https://metamask.io/institutions/';
export const MMI_WEB_SITE = _mmiWebSite;
///: END:ONLY_INCLUDE_IF

// eslint-disable-next-line prefer-destructuring
export const METAMETRICS_SETTINGS_LINK =
'https://support.metamask.io/privacy-and-security/how-to-manage-your-metametrics-settings';
// eslint-disable-next-line prefer-destructuring
export const SUPPORT_REQUEST_LINK = process.env.SUPPORT_REQUEST_LINK;
export const CONTRACT_ADDRESS_LINK = _contractAddressLink;
Expand Down
Loading

0 comments on commit ed0cc1e

Please sign in to comment.