1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 19:26:13 +02:00
Commit Graph

41 Commits

Author SHA1 Message Date
Jyoti Puri
e7deab4b9b
Persisting segment events in MetaMetricsController store (#16198) 2022-11-08 04:33:03 +05:30
Niranjana Binoy
39037684d4
Fix: To differentiate between which chrome alarm is triggered (#16360) 2022-11-04 11:23:56 -04:00
Erik Marks
a8c1756816
Remove 3box feature and delete ThreeBoxController (#14571)
* 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>
2022-10-31 13:50:50 -02:30
Jyoti Puri
6995174cbc
MV3 Segment Fix (#16020) 2022-10-11 20:34:32 +05:30
Niranjana Binoy
29c2b136b8
Replace setInterval with chrome alarms for MetaMetrics FinalizeEventFragment (#16003) 2022-10-04 13:03:50 -04:00
Jyoti Puri
c2b7690119
Make metrics related actions idempotent (#15737) 2022-09-16 22:34:14 +05:30
VSaric
cd5398b2b2
Replaced use of pubnub for uuid method in app/ directory (#15712) 2022-09-06 09:13:04 -05:00
John Brennan
1c9764a6a2
Fix onboarding events (#15608) 2022-08-18 16:31:07 -05:00
Daniel
2eb0fe6978
Add more tracking for MetaMask (#15462) 2022-08-11 19:33:33 +02:00
Brad Decker
c72199a1a6
update prettier (#15360) 2022-07-31 13:26:40 -05:00
Brad Decker
652d631cda
remove exclusions for mismatched object jsdoc type casing (#15351) 2022-07-27 08:28:05 -05:00
Ariella Vu
ac956c43d8
MetaMetrics: Fixes TypeError: Object.values(...).reduce(...).flat is not a function (#14962)
* metametrics: flat is not a function

* MetaMetrics: shorten array logic
2022-06-15 14:52:32 -05:00
Brad Decker
ae4efef43e
add networks without ticker trait (#14607)
* add networks without ticker trait
2022-05-13 12:01:29 -05:00
Niranjana Binoy
6c757ab5e0
Event tracking for Token Detection V2 (#14441) 2022-05-11 16:27:58 -04:00
Ariella Vu
f926925b3f
metametrics: deprecate flatMap (#14608) 2022-05-03 16:17:08 -07:00
Ariella Vu
d0ed2c1afc
MetaMetrics: add 'number_of_nfts' user trait (#14495)
* MetaMetrics: add number_of_nfts trait

* MetaMetrics: memoize _getAllNFTAddresses

* MetaMetrics: fix lint / update JSDoc comments

* MetaMetrics: update nft trait logic
- https://github.com/MetaMask/metamask-extension/pull/14495#discussion_r855450898

* MetaMetrics: rn _getAllNFTs > _getAllNFTsFlattened
2022-04-21 18:46:12 -03:00
David Walsh
bcdd52f55a
Dark Mode: Implement Metrics (#14455) 2022-04-18 11:31:44 -05:00
Ariella Vu
21e54f4717
MetaMetrics: Identify 'number_of_tokens' user trait (#14427)
* 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
2022-04-15 13:35:07 -03:00
Ariella Vu
e7bb8e2663
MetaMetrics: Identify 'nft_autodetection_enabled' & 'opensea_api_enabled' (#14367)
* MetaMetrics: alphabetize traits

* MetaMetrics: identify nft_autodetection_enabled

* MetaMetrics: identify opensea_api_enabled

* metametrics.test: alphabetize traits

* metametrics.test: add new traits
- nft_autodetection_enabled
- opensea_api_enabled

* MetaMetrics: @property use string literals

* MetaMetrics.test: update with openSeaEnabled & useCollectibleDetection

* MetaMetrics: alphabetize

* MetaMetrics: update MetaMetricsTraits @typedef
- add nft_autodetection_enabled
- add opensea_api_enabled
2022-04-15 10:39:55 -03:00
Brad Decker
922ebd57cb
track address book usage (#14382)
* track address book usage

* Update app/scripts/controllers/metametrics.js

Co-authored-by: Ariella Vu <20778143+digiwand@users.noreply.github.com>

* Update shared/constants/metametrics.js

Co-authored-by: Ariella Vu <20778143+digiwand@users.noreply.github.com>

Co-authored-by: Ariella Vu <20778143+digiwand@users.noreply.github.com>
2022-04-13 11:46:49 -05:00
Olusegun Akintayo
9bd391a35f
User trait - number of nft collections (#14377)
* 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>
2022-04-10 11:42:00 +04:00
Ariella Vu
f088db99a3
MetaMetrics: add segment.identify (#14195)
* MetaMetrics: add segment.identify

* MetaMetrics: rm non-existent typedef

* MetaMetrics: WIP segment.identify pt. 2

* Revert "MetaMetrics: WIP segment.identify pt. 2"

This reverts commit 8126de4dff9312aab2275cba81d0432bfcdb097b.

* MetaMetrics: add identify tests

* MetaMetricsController: update identify w/ fix

* MetaMetricsController: fix identify tests

* MetaMetricsController#identify: warn instead of throw

* MetaMetrics: transform date into ISO string

* MetaMetricsController: alphabetize test

* MetaMetricsController: restore asset in test

* MetaMetrics: rn traits -> userTraits

* MetaMetrics: restore trackEvent location

* update to follow analytics-node api

* MetaMetricsController: update tests + @link

* MetaMetrics: destimation -> destination

Co-authored-by: brad-decker <bhdecker84@gmail.com>
2022-03-31 16:21:01 -03:00
Brad Decker
b525c620f4
Build user traits object when metamask state changes (#14192) 2022-03-28 16:56:56 -05:00
yanjade
3eb99babf2
batch fix misspelling (#13449) 2022-01-28 09:09:07 -06:00
Brad Decker
c58cc631c7
implement event fragments for tx controller (#13331) 2022-01-20 10:26:39 -06:00
Brad Decker
dffad6e35d
use object.values to get array for iteration (#13300) 2022-01-13 12:10:47 -06:00
Brad Decker
b820ef131b
Implement event fragments (#12251) 2022-01-12 13:31:54 -06:00
Mark Stacey
3732c5f71e
Add JSDoc ESLint rules (#12112)
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.
2022-01-07 12:27:33 -03:30
Dan J Miller
c9baf39c4d
Ensure that metametrics error related to anonymousId is not sent to sentry (#12763) 2021-11-19 14:07:50 -03:30
kumavis
3c749190d8
metametrics - ensure segment submission failures do not bubble up (#12573)
* 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>
2021-11-10 17:27:04 -10:00
ryanml
a69ed05141
Removing obsolete client-side transaction metrics events (#11329)
* Removing metametrics send count tracking

* Removing client side Transaction Completed and Canceled events
2021-06-24 15:37:44 -07:00
Dan J Miller
1323a77531
Add stringified payload to metametrics controller trackEvent error message (#11166)
* Add stringified payload to metametrics controller trackEvent error message

* Don't include full payload when throwing error on missing event or category in trackEvent
2021-05-24 16:57:07 -02:30
Brad Decker
f1825e850d
use one segment instance (#10915) 2021-04-26 11:05:43 -05:00
Brad Decker
d1f8171877
upgrade ethereumjs util (#10886) 2021-04-16 10:05:13 -05:00
Brad Decker
1d23b59af3
add Custom Network Added event (#10484) 2021-02-23 09:58:35 -06:00
Erik Marks
76a2a9bb8b
@metamask/eslint config@5.0.0 (#10358)
* @metamask/eslint-config@5.0.0
* Update eslintrc and prettierrc
* yarn lint:fix
2021-02-04 10:15:23 -08:00
Erik Marks
90289ec22a
Further improve organization of constants (#10200) 2021-01-20 08:13:14 -08:00
Brad Decker
64adcae08d
throw a new wrapped error instead of default one from segment (#10118) 2020-12-23 00:24:49 -03:30
Erik Marks
e05be40d92
@metamask/obs-store@5.0.0 (#10092) 2020-12-16 13:14:49 -08:00
Mark Stacey
703a063ad1
Fix metrics error when options are not used (#9985)
Attempts to send metrics would fail when no `options` were used. This
was because when the options parameter was not set, it was often sent
over our RPC connection as `undefined`, which gets serialized to `null`
when the message is converted to JSON. This `null` parameter didn't
trigger the default parameter set in the metametrics controller, as
default parameters are only used for `undefined`.

Instead the `options` parameter is now treated as fully optional, with
no default value set. The optional chaining operator is used to ensure
it won't blow up if it's not set. A fallback of `{}` was used for the
one destructure case as well.
2020-12-03 15:35:11 -03:30
Brad Decker
0653a489b0
add new MetaMetricsController (#9857) 2020-12-02 15:41:30 -06:00