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

refactor: Typescript conversion of watch-asset.js

Open NiranjanaBinoy opened this issue 1 year ago • 4 comments

Part of #23014 Fixes #23474

Converting the level 6 dependency file app/scripts/lib/rpc-method-middleware/handlers/watch-asset.js to typescript for contributing to metamask-controller.js.

Description

Open in GitHub Codespaces

Related issues

Fixes:

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

After

Pre-merge author checklist

  • [ ] I’ve followed MetaMask Coding Standards.
  • [ ] I've completed the PR template to the best of my ability
  • [ ] 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.

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.

NiranjanaBinoy avatar Mar 28 '24 03:03 NiranjanaBinoy

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 Mar 28 '24 03:03 github-actions[bot]

BTW we can directly merge to develop :)

merge 2 commits into extract-wrapper-type from ts-watch-asset

DDDDDanica avatar Apr 08 '24 12:04 DDDDDanica

This PR has been automatically marked as stale because it has not had recent activity in the last 60 days. It will be closed in 14 days. Thank you for your contributions.

github-actions[bot] avatar Jun 08 '24 20:06 github-actions[bot]

This PR was closed because there has been no follow up activity in the last 14 days. Thank you for your contributions.

github-actions[bot] avatar Jun 22 '24 20:06 github-actions[bot]

Builds ready [2ec2750]
Page Load Metrics (73 ± 22 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint722971136130
domContentLoaded993312412
load38206734522
domInteractive993312412
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

metamaskbot avatar Aug 14 '24 18:08 metamaskbot

Codecov Report

Attention: Patch coverage is 92.85714% with 1 line in your changes missing coverage. Please review.

Project coverage is 69.98%. Comparing base (cdd543d) to head (2ec2750). Report is 1133 commits behind head on develop.

Files with missing lines Patch % Lines
.../lib/rpc-method-middleware/handlers/watch-asset.ts 92.86% 1 Missing :warning:
Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #23776   +/-   ##
========================================
  Coverage    69.98%   69.98%           
========================================
  Files         1422     1422           
  Lines        49926    49926           
  Branches     13861    13861           
========================================
  Hits         34940    34940           
  Misses       14986    14986           

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

codecov[bot] avatar Aug 14 '24 18:08 codecov[bot]

This PR has been automatically marked as stale because it has not had recent activity in the last 60 days. It will be closed in 14 days. Thank you for your contributions.

github-actions[bot] avatar Oct 14 '24 02:10 github-actions[bot]

@metamaskbot update-policies

MajorLift avatar Jan 31 '25 12:01 MajorLift

No policy changes

metamaskbot avatar Jan 31 '25 13:01 metamaskbot

Builds ready [131dcb2]
Page Load Metrics (1487 ± 29 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint1345160414866029
domContentLoaded1339159314705828
load1346160414876029
domInteractive238932178
backgroundConnect986222010
firstReactRender1575442612
getState4588126
initialActions041294
loadScripts938117510425325
setupStore611810
uiStartup1516183316867436
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 8 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

metamaskbot avatar Jan 31 '25 13:01 metamaskbot

LGTM !

DDDDDanica avatar Feb 03 '25 16:02 DDDDDanica

This PR has been automatically marked as stale because it has not had recent activity in the last 90 days. It will be closed in 7 days. Thank you for your contributions.

github-actions[bot] avatar Jun 11 '25 00:06 github-actions[bot]

This PR was closed because there has been no follow up activity in 7 days. Thank you for your contributions.

github-actions[bot] avatar Jun 19 '25 00:06 github-actions[bot]

Builds ready [131dcb2]
UI Startup Metrics (1220 ± 62 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1220112314106212601320
load105794811936111041158
domContentLoaded105194411886110991153
domInteractive18144761636
firstPaint79372119540410951159
backgroundConnect74334711
firstReactRender22175062233
getState1263161726
initialActions001001
loadScripts80469993060852901
setupStore85193816
WebpackHomeuiStartup21071704266923522572551
load16111291205421117562005
domContentLoaded16051286205021017521991
domInteractive171174131355
firstPaint1686257078224293
backgroundConnect2410280362239
firstReactRender19990400105329393
getState1043751218
initialActions215134
loadScripts16001279203920817391980
setupStore2773126216276
FirefoxBrowserifyHomeuiStartup1326117716589813681559
load1166103913346812111293
domContentLoaded1166103813346812111293
domInteractive1123531955122288
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2113141152144
firstReactRender23213822427
getState1059112931
initialActions001001
loadScripts1148102613186711941262
setupStore84758619
WebpackHomeuiStartup16371400213017617392015
load14171194179815015331683
domContentLoaded14161194179814915331682
domInteractive101335257095298
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect22154352435
firstReactRender43345344550
getState1163961126
initialActions102111
loadScripts13971176177114915151663
setupStore105416928
Benchmark value 2551 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 393 exceeds gate value 370 for chrome webpack home p95 firstReactRender
Benchmark value 1981 exceeds gate value 1970 for chrome webpack home p95 loadScripts
Benchmark value 276 exceeds gate value 65 for chrome webpack home p95 setupStore
Benchmark value 112 exceeds gate value 110 for firefox browserify home mean domInteractive
Benchmark value 288 exceeds gate value 195 for firefox browserify home p95 domInteractive
Benchmark value 31 exceeds gate value 24 for firefox browserify home p95 getState
Benchmark value 1638 exceeds gate value 1615 for firefox webpack home mean uiStartup
Benchmark value 1417 exceeds gate value 1380 for firefox webpack home mean load
Benchmark value 1417 exceeds gate value 1380 for firefox webpack home mean domContentLoaded
Benchmark value 102 exceeds gate value 100 for firefox webpack home mean domInteractive
Benchmark value 43 exceeds gate value 38 for firefox webpack home mean firstReactRender
Benchmark value 1398 exceeds gate value 1360 for firefox webpack home mean loadScripts
Benchmark value 2015 exceeds gate value 1935 for firefox webpack home p95 uiStartup
Benchmark value 1683 exceeds gate value 1660 for firefox webpack home p95 load
Benchmark value 1682 exceeds gate value 1660 for firefox webpack home p95 domContentLoaded
Benchmark value 298 exceeds gate value 156 for firefox webpack home p95 domInteractive
Benchmark value 1663 exceeds gate value 1630 for firefox webpack home p95 loadScripts
Sum of mean exceeds: 144ms | Sum of p95 exceeds: 742ms
Sum of all benchmark exceeds: 886ms

Bundle size diffs [🚀 Bundle size reduced!]
  • background: -547.65 KiB (-9.28%)
  • ui: -641.17 KiB (-8.14%)
  • common: -749.2 KiB (-8.18%)

metamaskbot avatar Jun 23 '25 10:06 metamaskbot

Builds ready [21448a6]
UI Startup Metrics (1244 ± 57 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1244113614015712821346
load107496711985711001188
domContentLoaded106796111925810951182
domInteractive17143951731
firstPaint70579120043310901172
backgroundConnect74273811
firstReactRender23164972441
getState1565492131
initialActions001001
loadScripts81770693755845921
setupStore96436818
WebpackHomeuiStartup21711667280321722632595
load16651248211618617561999
domContentLoaded16601244209918517491988
domInteractive171185151358
firstPaint1706259874192295
backgroundConnect19104262132
firstReactRender22089414112358403
getState134323321124
initialActions215134
loadScripts16571242208918317481977
setupStore167269261624
FirefoxBrowserifyHomeuiStartup13581227169310413861617
load1195107514237412421339
domContentLoaded1194107514237412421338
domInteractive1103534161108318
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2214123122242
firstReactRender24205342428
getState105759925
initialActions001001
loadScripts1176105413997412201316
setupStore948912824
WebpackHomeuiStartup16031360224618716852077
load13931158200316314721794
domContentLoaded13931158200316314721793
domInteractive97314756988276
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect211410092133
firstReactRender41314734346
getState125103121133
initialActions102111
loadScripts13751142198316214521771
setupStore85324818
Benchmark value 1244 exceeds gate value 1234 for chrome browserify home mean uiStartup
Benchmark value 1074 exceeds gate value 1070 for chrome browserify home mean load
Benchmark value 1068 exceeds gate value 1061 for chrome browserify home mean domContentLoaded
Benchmark value 24 exceeds gate value 23 for chrome browserify home mean firstReactRender
Benchmark value 1183 exceeds gate value 1180 for chrome browserify home p95 domContentLoaded
Benchmark value 18 exceeds gate value 17 for chrome browserify home p95 setupStore
Benchmark value 2595 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 58 exceeds gate value 57 for chrome webpack home p95 domInteractive
Benchmark value 403 exceeds gate value 370 for chrome webpack home p95 firstReactRender
Benchmark value 1977 exceeds gate value 1970 for chrome webpack home p95 loadScripts
Benchmark value 111 exceeds gate value 110 for firefox browserify home mean domInteractive
Benchmark value 10 exceeds gate value 9 for firefox browserify home mean setupStore
Benchmark value 318 exceeds gate value 195 for firefox browserify home p95 domInteractive
Benchmark value 25 exceeds gate value 24 for firefox browserify home p95 getState
Benchmark value 1394 exceeds gate value 1380 for firefox webpack home mean load
Benchmark value 1394 exceeds gate value 1380 for firefox webpack home mean domContentLoaded
Benchmark value 41 exceeds gate value 38 for firefox webpack home mean firstReactRender
Benchmark value 1375 exceeds gate value 1360 for firefox webpack home mean loadScripts
Benchmark value 2077 exceeds gate value 1935 for firefox webpack home p95 uiStartup
Benchmark value 1794 exceeds gate value 1660 for firefox webpack home p95 load
Benchmark value 1793 exceeds gate value 1660 for firefox webpack home p95 domContentLoaded
Benchmark value 276 exceeds gate value 156 for firefox webpack home p95 domInteractive
Benchmark value 33 exceeds gate value 32 for firefox webpack home p95 getState
Benchmark value 1771 exceeds gate value 1630 for firefox webpack home p95 loadScripts
Sum of mean exceeds: 70ms | Sum of p95 exceeds: 981ms
Sum of all benchmark exceeds: 1051ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 8 Bytes (0%)
  • ui: 0 Bytes (0%)
  • common: 0 Bytes (0%)

metamaskbot avatar Jun 23 '25 11:06 metamaskbot