* Capture Sentry errors prior to initialization
Sentry errors captured before/during the wallet initialization are
currently not captured because we don't have the controller state yet
to determine whether the user has consented.
The Sentry setup has been updated to check the persisted state for
whether the user has consented, as a fallback in case the controller
state hasn't been initialized yet. This ensures that we capture errors
during initialization if the user has opted in.
* Always await async check for whether the user has opted in
* Remove unused import
* Update JSDoc return type
* Remove unused driver method
* Fix metametrics controller unit tests
* Fix e2e tests
* Fix e2e test on Firefox
* Start session upon install rather than toggle
* Added code fences to the following controllers: app-state, metametrics, preferences
* Fixed prettier
* Updated code to be align with new changes in MMI
* Changing code fences
* Remove uneeded files
* Fixed tests
* Fixed code fence
* Changing logic to use async/await
* Removed accountAddress
* Reverted code from develop
* feat: add yaml feature management
Add yaml feature file per build type.
Also add method to parse yaml and set
enabled features env to true. The build
process will then replace any process.env[feature]
that exists on the config by its value
* chore: add example for desktop
* Added initial draft of build features
* [TMP] Sync between computers
* Is able to succesfully build stable extension with snaps feature
* Removing var context from builds.yml
* Add asssets to builds.yml
* Minor bug fixes and removing debug logs
* [WIP] Test changes
* Removed TODOs
* Fix regession bug
Also
* remove debug logs
* merge Variables.set and Variables.setMany with an overload
* Fix build, lint and a bunch of issues
* Update LavaMoat policies
* Re-add desktop build type
* Fix some tests
* Fix desktop build
* Define some env variables used by MV3
* Fix lint
* Fix remove-fenced-code tests
* Fix README typo
* Move new code
* Fix missing asset copy
* Move Jest env setup
* Fix path for test after rebase
* Fix code fences
* Fix fencing and LavaMoat policies
* Fix MMI code-fencing after rebase
* Fix MMI code fencing after merge
* Fix more MMI code fencing
---------
Co-authored-by: cryptotavares <joao.tavares@consensys.net>
Co-authored-by: Frederik Bolding <frederik.bolding@gmail.com>
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
We want to convert NetworkController to TypeScript in order to be able
to compare differences in the controller between in this repo and the
core repo. To do this, however, we need to convert the dependencies of
the controller to TypeScript.
As a part of this effort, this commit converts
`shared/constants/metametrics` to TypeScript. Note that simple objects
have been largely replaced with enums. There are some cases where I even
split up some of these objects into multiple enums.
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
The controllers package has been updated to v33. The only breaking
change in this release was to rename the term "collectible" to "NFT"
wherever it appeared in the API.
Changes in this PR have been kept minimal; additional renaming can be
done in separate PRs. This PR only updates the controller names,
controller state, controller methods, and any direct references to
these things. NFTs are still called "collectibles" in most places.
* Remove 3box feature and delete ThreeBoxController
Lint locale messages
lavamoat policy updates
* Restore 3Box user trait with value `false`
The 3Box user trait has been restored and hard-coded as `false`. This
ensures that users don't get stuck in our metrics as having this trait.
A deprecation comment has been left in various places for this trait.
* Remove unused state
* Remove additional 3box-related things
* Run `yarn-deduplicate`
* Restore migration that was lost while rebasing
* Remove obsolete override
* Remove additional unused resolutions/dependencies
* Update LavaMoat policies
* Remove obsolete security advisory ignore entries
* Remove 3Box fixture builder method
* Update unit tests
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
* MetaMetrics: identify number_of_tokens
* MetaMetrics: update number_of_tokens
do not filter by unique addresses.
Each token contract x chain id combo is a unique contract
* MetaMetrics: update MetaMetricsTraits @typedef
- add number_of_tokens
* MetaMetrics: clean up number_of_tokens
* MetaMetrics: alphabetize in test
* Add new user trait for 'Number of NFT collections'.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
FIx JS DOC
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
Arrange TRAITS in alphabetical order
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
Unit Tests for allCollectibles traits tracking.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
change cid to chainId
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* invert condition
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* jsdoc - alphabetical order
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* change {string} to the literal {number_of_nft_collections}
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Optimize _getNumberOfNFTs
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
ESLint rules have been added to enforce our JSDoc conventions. These
rules were introduced by updating `@metamask/eslint-config` to v9.
Some of the rules have been disabled because the effort to fix all lint
errors was too high. It might be easiest to enable these rules one
directory at a time, or one rule at a time.
Most of the changes in this PR were a result of running
`yarn lint:fix`. There were a handful of manual changes that seemed
obvious and simple to make. Anything beyond that and the rule was left
disabled.
* metametrics - ensure segment submission failures do not bubble up
* metametrics - differentiate between trackEvent and submitEvent
* metametrics - validate event in trackEvent
* metametrics - re-throw error on clean stack
* lint fix
* controllers/metametrics - take a captureException option
* controllers/metametrics - capture and report any errors in trackPage
* Update app/scripts/controllers/metametrics.js
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
* Add stringified payload to metametrics controller trackEvent error message
* Don't include full payload when throwing error on missing event or category in trackEvent