metamask-extension icon indicating copy to clipboard operation
metamask-extension copied to clipboard

Replace `DetectTokensController` with consolidated `TokenDetectionController` from core

Open MajorLift opened this issue 1 year ago • 1 comments

Description

Related issues

  • Fixes: https://github.com/MetaMask/core/issues/3916
  • Blocked by:
    • https://github.com/MetaMask/core/pull/3923
    • @metamask/assets-controllers v26.0.0 release (https://github.com/MetaMask/core/pull/3918)

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

After

Pre-merge author checklist

  • [ ] I’ve followed MetaMask Coding Standards.
  • [ ] I've clearly explained what problem this PR is solving and how it is solved.
  • [ ] I've linked related issues
  • [ ] I've included manual testing steps
  • [ ] I've included screenshots/recordings if applicable
  • [ ] I’ve included tests if applicable
  • [ ] I’ve documented my code using JSDoc format if applicable
  • [ ] I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
  • [ ] 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.

MajorLift avatar Feb 13 '24 20:02 MajorLift

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

github-actions[bot] avatar Feb 13 '24 20:02 github-actions[bot]

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@metamask/[email protected] Transitive: environment, eval, filesystem, network, shell, unsafe +229 56.2 MB metamaskbot
npm/@metamask/[email protected] Transitive: environment, eval, filesystem, network, shell, unsafe +280 73.8 MB metamaskbot
npm/@metamask/[email protected] Transitive: environment, network +27 4.83 MB mcmire
npm/@metamask/[email protected] Transitive: environment, eval, filesystem, network +124 19.7 MB metamaskbot
npm/@metamask/[email protected] Transitive: environment, eval, filesystem, network +125 19.8 MB metamaskbot
npm/@types/[email protected] None 0 2.75 kB types
npm/@types/[email protected] None 0 3.2 kB types
npm/@xstate/[email protected] environment 0 57.1 kB xstate-release-bot
npm/[email protected] filesystem 0 1.45 MB ldthomas
npm/[email protected] None 0 38.2 kB kasperisager
npm/[email protected] filesystem +1 4.38 MB harrisiirak
npm/[email protected] None 0 8.52 kB zkochan
npm/[email protected] None 0 81.8 kB acubed
npm/[email protected] None 0 788 kB vitaly
npm/[email protected] None 0 25.2 kB matteo.collina
npm/[email protected] None +2 57.4 kB mafintosh

🚮 Removed packages: npm/@metamask/[email protected], npm/@metamask/[email protected], npm/@metamask/[email protected], npm/@types/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected]

View full report↗︎

socket-security[bot] avatar Mar 08 '24 22:03 socket-security[bot]

🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎

To accept the risk, merge this PR and you will not be notified again.

Alert Package Note
New author npm/[email protected]

Ignoring: npm/@metamask/[email protected], npm/@metamask/[email protected], npm/@metamask/[email protected], npm/@metamask/[email protected], npm/@metamask/[email protected]

View full report↗︎

Next steps

What is new author?

A new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.

Scrutinize new collaborator additions to packages because they now have the ability to publish code into your dependency tree. Packages should avoid frequent or unnecessary additions or changes to publishing rights.

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/[email protected] or ignore all packages with @SocketSecurity ignore-all

socket-security[bot] avatar Mar 08 '24 22:03 socket-security[bot]

@SocketSecurity ignore npm/@metamask/[email protected] npm/@metamask/[email protected] npm/@metamask/[email protected] npm/@metamask/[email protected] npm/@metamask/[email protected]

Internal packages

MajorLift avatar Mar 08 '24 23:03 MajorLift

Codecov Report

Attention: Patch coverage is 58.06452% with 13 lines in your changes are missing coverage. Please review.

Project coverage is 68.82%. Comparing base (734a0b0) to head (0f5db24). Report is 1 commits behind head on develop.

Files Patch % Lines
app/scripts/metamask-controller.js 54.55% 10 Missing :warning:
ui/store/actions.ts 0.00% 2 Missing :warning:
app/scripts/controllers/preferences.js 83.33% 1 Missing :warning:
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #22928      +/-   ##
===========================================
+ Coverage    68.80%   68.82%   +0.02%     
===========================================
  Files         1127     1126       -1     
  Lines        43595    43450     -145     
  Branches     11661    11629      -32     
===========================================
- Hits         29993    29903      -90     
+ Misses       13602    13547      -55     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Mar 10 '24 10:03 codecov[bot]

Builds ready [0375d17]
Page Load Metrics (1381 ± 265 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint791781312512
domContentLoaded186734178
load7518111381552265
domInteractive186734178
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -73.47 KiB (-1.96%)
  • ui: 48 Bytes (0.00%)
  • common: -3.49 KiB (-0.07%)

metamaskbot avatar Mar 10 '24 10:03 metamaskbot

Builds ready [4ed7f10]
Page Load Metrics (1286 ± 430 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint702121264019
domContentLoaded148035209
load5824941286896430
domInteractive148035209
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -73.46 KiB (-1.96%)
  • ui: 48 Bytes (0.00%)
  • common: -3.49 KiB (-0.07%)

metamaskbot avatar Mar 10 '24 12:03 metamaskbot

Builds ready [484be71]
Page Load Metrics (1321 ± 386 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint832221334019
domContentLoaded987492613
load6621051321805386
domInteractive987492613
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -73.52 KiB (-1.96%)
  • ui: 48 Bytes (0.00%)
  • common: -3.49 KiB (-0.07%)

metamaskbot avatar Mar 10 '24 20:03 metamaskbot

Builds ready [00d5e74]
Page Load Metrics (1343 ± 462 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint683041265124
domContentLoaded9131323014
load5527261343961462
domInteractive9131323014
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -73.51 KiB (-1.96%)
  • ui: 48 Bytes (0.00%)
  • common: -3.49 KiB (-0.07%)

metamaskbot avatar Mar 10 '24 20:03 metamaskbot

Builds ready [cc9d167]
Page Load Metrics (1299 ± 434 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint813151456431
domContentLoaded11112392612
load7426971299905434
domInteractive11112392612
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -73.51 KiB (-1.96%)
  • ui: 48 Bytes (0.00%)
  • common: -3.49 KiB (-0.07%)

metamaskbot avatar Mar 10 '24 20:03 metamaskbot

Builds ready [cc9d167]
Page Load Metrics (1581 ± 382 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint762991384723
domContentLoaded1077312010
load6627471581796382
domInteractive1077312010
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -73.51 KiB (-1.96%)
  • ui: 48 Bytes (0.00%)
  • common: -3.49 KiB (-0.07%)

metamaskbot avatar Mar 10 '24 21:03 metamaskbot

Builds ready [32bc395]
Page Load Metrics (1506 ± 458 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint762441423919
domContentLoaded118037209
load6328961506954458
domInteractive118037209
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -73.51 KiB (-1.96%)
  • ui: 48 Bytes (0.00%)
  • common: -3.49 KiB (-0.07%)

metamaskbot avatar Mar 11 '24 21:03 metamaskbot

Builds ready [dc34547]
Page Load Metrics (1172 ± 469 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint721741183115
domContentLoaded117226168
load6023201172976469
domInteractive117226168
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -73.51 KiB (-1.96%)
  • ui: 48 Bytes (0.00%)
  • common: -3.49 KiB (-0.07%)

metamaskbot avatar Mar 12 '24 15:03 metamaskbot

Builds ready [b7721a7]
Page Load Metrics (682 ± 440 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint712431174220
domContentLoaded107930199
load582281682916440
domInteractive107930199
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -73.1 KiB (-1.95%)
  • ui: 48 Bytes (0.00%)
  • common: -3.49 KiB (-0.07%)

metamaskbot avatar Mar 12 '24 20:03 metamaskbot

Builds ready [b7721a7]
Page Load Metrics (1003 ± 449 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint682001203718
domContentLoaded1072322010
load5523271003935449
domInteractive1072322010
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -73.1 KiB (-1.95%)
  • ui: 48 Bytes (0.00%)
  • common: -3.49 KiB (-0.07%)

metamaskbot avatar Mar 12 '24 20:03 metamaskbot

Builds ready [1e3ed75]
Page Load Metrics (752 ± 436 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint691781122612
domContentLoaded106226157
load562209752908436
domInteractive106226157
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -73.26 KiB (-1.96%)
  • ui: 48 Bytes (0.00%)
  • common: -3.49 KiB (-0.07%)

metamaskbot avatar Mar 12 '24 20:03 metamaskbot

Builds ready [5f430c4]
Page Load Metrics (1499 ± 466 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint781871183115
domContentLoaded117024157
load6428821499970466
domInteractive117024157
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -73.26 KiB (-1.96%)
  • ui: 48 Bytes (0.00%)
  • common: -3.49 KiB (-0.07%)

metamaskbot avatar Mar 12 '24 21:03 metamaskbot

Builds ready [4f6a160]
Page Load Metrics (1404 ± 418 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint842061423316
domContentLoaded1184452512
load7126461404871418
domInteractive1184452512
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -73.26 KiB (-1.96%)
  • ui: 48 Bytes (0.00%)
  • common: -3.49 KiB (-0.07%)

metamaskbot avatar Mar 13 '24 01:03 metamaskbot

Builds ready [b825ed4]
Page Load Metrics (1298 ± 428 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint7164715911957
domContentLoaded11251415124
load5822971298892428
domInteractive11251415124
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -73.35 KiB (-1.96%)
  • ui: 48 Bytes (0.00%)
  • common: -3.49 KiB (-0.07%)

metamaskbot avatar Mar 13 '24 01:03 metamaskbot

Builds ready [b825ed4]
Page Load Metrics (1455 ± 431 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint802511374220
domContentLoaded1089312110
load7123451455897431
domInteractive1089312110
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -73.35 KiB (-1.96%)
  • ui: 48 Bytes (0.00%)
  • common: -3.49 KiB (-0.07%)

metamaskbot avatar Mar 13 '24 04:03 metamaskbot

Builds ready [b825ed4]
Page Load Metrics (1154 ± 467 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint742081283617
domContentLoaded10100402713
load6024051154972467
domInteractive10100402713
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -73.35 KiB (-1.96%)
  • ui: 48 Bytes (0.00%)
  • common: -3.49 KiB (-0.07%)

metamaskbot avatar Mar 13 '24 16:03 metamaskbot

Builds ready [5f7ae9d]
Page Load Metrics (1240 ± 465 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint622991275828
domContentLoaded993302412
load5525311240967465
domInteractive993302412
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -73.33 KiB (-1.96%)
  • ui: 48 Bytes (0.00%)
  • common: -3.47 KiB (-0.07%)

metamaskbot avatar Mar 13 '24 17:03 metamaskbot

I'm not super familiar with the controller messaging patterns to determine if they're all correct. But I don't see anything that looks wrong! 🚀

bergeron avatar Mar 13 '24 20:03 bergeron

Builds ready [3957631]
Page Load Metrics (1413 ± 474 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint794101437435
domContentLoaded136528147
load6626621413988474
domInteractive136528147
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -73.33 KiB (-1.96%)
  • ui: 48 Bytes (0.00%)
  • common: -3.47 KiB (-0.07%)

metamaskbot avatar Mar 13 '24 22:03 metamaskbot

Builds ready [17dde59]
Page Load Metrics (1048 ± 461 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint692231284019
domContentLoaded989372311
load6222521048960461
domInteractive989372311
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -73.33 KiB (-2.00%)
  • ui: 48 Bytes (0.00%)
  • common: -3.47 KiB (-0.07%)

metamaskbot avatar Mar 13 '24 23:03 metamaskbot