Skip to content

Commit

Permalink
Fixed metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
filipsekulic committed Feb 14, 2023
1 parent 5f6c703 commit 46f8e6b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
13 changes: 4 additions & 9 deletions app/scripts/controllers/metametrics.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,6 @@ export default class MetaMetricsController {
environment === 'production' ? version : `${version}-${environment}`;
this.extension = extension;
this.environment = environment;
this.transactionSecurityCheckEnabled =
prefState.transactionSecurityCheckEnabled;

const abandonedFragments = omitBy(initState?.fragments, 'persist');
const segmentApiCalls = initState?.segmentApiCalls || {};
Expand All @@ -145,12 +143,9 @@ export default class MetaMetricsController {
},
});

preferencesStore.subscribe(
({ currentLocale, transactionSecurityCheckEnabled }) => {
this.locale = currentLocale.replace('_', '-');
this.transactionSecurityCheckEnabled = transactionSecurityCheckEnabled;
},
);
preferencesStore.subscribe(({ currentLocale }) => {
this.locale = currentLocale.replace('_', '-');
});

onNetworkDidChange(() => {
this.chainId = getCurrentChainId();
Expand Down Expand Up @@ -721,7 +716,7 @@ export default class MetaMetricsController {
[TRAITS.THREE_BOX_ENABLED]: false, // deprecated, hard-coded as false
[TRAITS.THEME]: metamaskState.theme || 'default',
[TRAITS.TOKEN_DETECTION_ENABLED]: metamaskState.useTokenDetection,
[TRAITS.SECURITY_PROVIDER]: this.transactionSecurityCheckEnabled
[TRAITS.SECURITY_PROVIDER]: metamaskState.transactionSecurityCheckEnabled
? ['opensea']
: [],
};
Expand Down
1 change: 1 addition & 0 deletions shared/constants/metametrics.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ export const TRAITS = {
* enabled? (deprecated)
* @property {string} [theme] - which theme the user has selected
* @property {boolean} [token_detection_enabled] - does the user have token detection is enabled?
* @property {Array<string>} [security_provider] - whether security provider feature toggle is on or off
*/

// Mixpanel converts the zero address value to a truly anonymous event, which
Expand Down

0 comments on commit 46f8e6b

Please sign in to comment.