-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: trackevent enabled is undefined (#12180)
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** > [!IMPORTANT] > The issue is due to the fact that `MetaMetrics.trackEvent` method has multiple signatures to handle the backward compatibility with old ways to call it. > After discussion (see the change history of this description), we decided to remove backward compatibility and the multiple signature system. We are going to simplify and then fix all the `trackEvent` calls. Asside from the changes in `MetaMetrics` and `useMetrics` hook (and tests) all the changes should be on the calls of `trackEvent`. ### Current changes in this PR - removes multiple signature `MetaMetrics.trackEvent` - updates `MetaMetrics` unit tests - updates `useMetrics` hook - updates `useMetrics` hook unit tests - deletes now useless legacy compatibility utils - updates all `trackEvent` calls - updates all unit tests that test `trackEvent` calls ## **Related issues** Fixes #12117 ## **Manual testing steps** 1. navigate the app 2. check trackEvent is called (check app logs) ## **Screenshots/Recordings** https://github.com/user-attachments/assets/058f6607-eda1-4eb5-bcae-a774deb13648 https://github.com/user-attachments/assets/fa0816cf-5459-4825-a162-a9a2e87c86ac ### **Before** N/A ### **After** N/A ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. --------- Co-authored-by: Frank von Hoven <[email protected]> Co-authored-by: Frank von Hoven <[email protected]>
- Loading branch information
1 parent
a74aa71
commit 2506358
Showing
194 changed files
with
3,388 additions
and
2,514 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.