Skip to content

Commit

Permalink
remove empty object from track events
Browse files Browse the repository at this point in the history
  • Loading branch information
tommasini committed Feb 23, 2024
1 parent 829882a commit 6712f74
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ const RevealPrivateCredential = ({
updateNavBar();
// Track SRP Reveal screen rendered
if (!isPrivateKey) {
trackEvent(MetaMetricsEvents.REVEAL_SRP_SCREEN, {});
trackEvent(MetaMetricsEvents.REVEAL_SRP_SCREEN);
}

const unlockWithBiometrics = async () => {
Expand Down Expand Up @@ -194,7 +194,7 @@ const RevealPrivateCredential = ({
{ view: 'Enter password' },
);

if (!isPrivateKey) trackEvent(MetaMetricsEvents.CANCEL_REVEAL_SRP_CTA, {});
if (!isPrivateKey) trackEvent(MetaMetricsEvents.CANCEL_REVEAL_SRP_CTA);
if (cancel) return cancel();
navigateBack();
};
Expand All @@ -212,7 +212,7 @@ const RevealPrivateCredential = ({
if (!isPrivateKey) {
const currentDate = new Date();
dispatch(recordSRPRevealTimestamp(currentDate.toString()));
trackEvent(MetaMetricsEvents.NEXT_REVEAL_SRP_CTA, {});
trackEvent(MetaMetricsEvents.NEXT_REVEAL_SRP_CTA);
}
setIsModalVisible(true);
setWarningIncorrectPassword('');
Expand All @@ -223,7 +223,7 @@ const RevealPrivateCredential = ({
};

const done = () => {
if (!isPrivateKey) trackEvent(MetaMetricsEvents.SRP_DONE_CTA, {});
if (!isPrivateKey) trackEvent(MetaMetricsEvents.SRP_DONE_CTA);
navigateBack();
};

Expand All @@ -237,7 +237,7 @@ const RevealPrivateCredential = ({
{ action: 'copied to clipboard' },
);

if (!isPrivateKey) trackEvent(MetaMetricsEvents.COPY_SRP, {});
if (!isPrivateKey) trackEvent(MetaMetricsEvents.COPY_SRP);

await ClipboardManager.setStringExpire(clipboardPrivateCredential);

Expand Down Expand Up @@ -289,7 +289,7 @@ const RevealPrivateCredential = ({
{ action: 'viewed SRP' },
);

if (!isPrivateKey) trackEvent(MetaMetricsEvents.VIEW_SRP, {});
if (!isPrivateKey) trackEvent(MetaMetricsEvents.VIEW_SRP);
} else if (event.i === 1) {
trackEvent(
isPrivateKey
Expand All @@ -298,7 +298,7 @@ const RevealPrivateCredential = ({
{ action: 'viewed QR code' },
);

if (!isPrivateKey) trackEvent(MetaMetricsEvents.VIEW_SRP_QR, {});
if (!isPrivateKey) trackEvent(MetaMetricsEvents.VIEW_SRP_QR);
}
};

Expand Down Expand Up @@ -400,7 +400,7 @@ const RevealPrivateCredential = ({
{ view: 'Hold to reveal' },
);

trackEvent(MetaMetricsEvents.SRP_DISMISS_HOLD_TO_REVEAL_DIALOG, {});
trackEvent(MetaMetricsEvents.SRP_DISMISS_HOLD_TO_REVEAL_DIALOG);

setIsModalVisible(false);
};
Expand Down
1 change: 0 additions & 1 deletion app/components/Views/Settings/AdvancedSettings/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,6 @@ class AdvancedSettings extends PureComponent {
PreferencesController.setDisabledRpcMethodPreference('eth_sign', false);
this.props.metrics.trackEvent(
MetaMetricsEvents.SETTINGS_ADVANCED_ETH_SIGN_DISABLED,
{},
);
}
};
Expand Down

0 comments on commit 6712f74

Please sign in to comment.