Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decouple MetaMetricsController from TxController #21330

Conversation

OGPoyraz
Copy link
Member

@OGPoyraz OGPoyraz commented Oct 11, 2023

Description

With ongoing effort of TransactionController alignment between mobile and extension, this PR aims to decouple MetaMetricsController functions from TransactionController and targets to make MetaMetrics event triggers client specific.

Manual testing steps

No functional changes.

Related issues

Fixes https://github.com/MetaMask/MetaMask-planning/issues/1053

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained:
    • What problem this PR is solving.
    • How this problem was solved.
    • How reviewers can test my changes.
  • I’ve indicated what issue this PR is linked to: Fixes #???
  • I’ve included tests if applicable.
  • I’ve documented any added code.
  • I’ve applied the right labels on the PR (see labeling guidelines).
  • I’ve properly set the pull request status:
    • In case it's not yet "ready for review", I've set it to "draft".
    • In case it's "ready for review", I've changed it from "draft" to "non-draft".

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.

@OGPoyraz OGPoyraz added the team-confirmations-system DEPRECATED: please use "team-confirmations" label instead label Oct 11, 2023
@OGPoyraz OGPoyraz changed the title Decouple MetaMetricsController from TxController [WIP] Decouple MetaMetricsController from TxController Oct 11, 2023
@metamaskbot
Copy link
Collaborator

Builds ready [367c52d]
Page Load Metrics (1164 ± 375 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint85148106168
domContentLoaded7114496168
load8419601164782375
domInteractive7114496168
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 5.6 KiB (0.15%)
  • ui: -130 Bytes (-0.00%)
  • common: 0 Bytes (0.00%)

@codecov
Copy link

codecov bot commented Oct 12, 2023

Codecov Report

Attention: 82 lines in your changes are missing coverage. Please review.

Comparison is base (703f4ba) 68.54% compared to head (4d25595) 68.55%.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #21330   +/-   ##
========================================
  Coverage    68.54%   68.55%           
========================================
  Files         1030     1031    +1     
  Lines        41037    41136   +99     
  Branches     10968    10980   +12     
========================================
+ Hits         28128    28197   +69     
- Misses       12909    12939   +30     
Files Coverage Δ
...p/scripts/lib/createRPCMethodTrackingMiddleware.js 66.92% <ø> (-1.79%) ⬇️
app/scripts/lib/snap-keyring/metrics.ts 4.55% <100.00%> (-13.64%) ⬇️
shared/constants/metametrics.ts 100.00% <ø> (ø)
shared/constants/transaction.ts 100.00% <ø> (ø)
ui/store/actions.ts 43.16% <ø> (ø)
ui/hooks/useTransactionEventFragment.js 75.00% <0.00%> (ø)
app/scripts/controllers/transactions/index.js 72.12% <0.00%> (-0.89%) ⬇️
app/scripts/metamask-controller.js 54.82% <83.33%> (+0.83%) ⬆️
app/scripts/lib/transaction-metrics.ts 70.12% <70.12%> (ø)

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@OGPoyraz OGPoyraz changed the title [WIP] Decouple MetaMetricsController from TxController Decouple MetaMetricsController from TxController Oct 12, 2023
@OGPoyraz OGPoyraz marked this pull request as ready for review October 12, 2023 07:28
@OGPoyraz OGPoyraz requested a review from a team as a code owner October 12, 2023 07:28
@OGPoyraz OGPoyraz requested a review from brad-decker October 12, 2023 07:38
@metamaskbot
Copy link
Collaborator

Builds ready [32dffcb]
Page Load Metrics (1160 ± 373 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint82139100157
domContentLoaded6814095189
load7918301160778373
domInteractive6813995189
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 5.66 KiB (0.16%)
  • ui: -130 Bytes (-0.00%)
  • common: 0 Bytes (0.00%)

ui/store/actions.ts Outdated Show resolved Hide resolved
@OGPoyraz OGPoyraz force-pushed the 1053-replace-metrics-logic-in-extension-transaction-controller-with-client-event-listeners-2 branch 3 times, most recently from 4e4e7d4 to 274f6c3 Compare October 16, 2023 10:07
@metamaskbot
Copy link
Collaborator

Builds ready [c5cdb26]
Page Load Metrics (1036 ± 411 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint82142106199
domContentLoaded67142962311
load8020881036855411
domInteractive67142962211
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 5.27 KiB (0.14%)
  • ui: -154 Bytes (-0.00%)
  • common: 0 Bytes (0.00%)

@OGPoyraz OGPoyraz force-pushed the 1053-replace-metrics-logic-in-extension-transaction-controller-with-client-event-listeners-2 branch 2 times, most recently from 4e3b65f to e2199d4 Compare October 18, 2023 21:49
@OGPoyraz OGPoyraz force-pushed the 1053-replace-metrics-logic-in-extension-transaction-controller-with-client-event-listeners-2 branch from e2199d4 to 4d25595 Compare October 18, 2023 22:01
@metamaskbot
Copy link
Collaborator

Builds ready [4d25595]
Page Load Metrics (818 ± 378 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint85134106178
domContentLoaded67161962311
load791818818787378
domInteractive67161962311
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 5.3 KiB (0.13%)
  • ui: -154 Bytes (-0.00%)
  • common: 0 Bytes (0.00%)

@OGPoyraz OGPoyraz merged commit f748db3 into develop Oct 19, 2023
9 checks passed
@OGPoyraz OGPoyraz deleted the 1053-replace-metrics-logic-in-extension-transaction-controller-with-client-event-listeners-2 branch October 19, 2023 10:47
@github-actions github-actions bot locked and limited conversation to collaborators Oct 19, 2023
@metamaskbot metamaskbot added the release-11.5.0 Issue or pull request that will be included in release 11.5.0 label Oct 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-11.5.0 Issue or pull request that will be included in release 11.5.0 team-confirmations-system DEPRECATED: please use "team-confirmations" label instead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants