Skip to content

Remove web3 shim usage event#20376

Merged
rekmarks merged 2 commits intodevelopfrom
remove-web3-shim-event
Aug 24, 2023
Merged

Remove web3 shim usage event#20376
rekmarks merged 2 commits intodevelopfrom
remove-web3-shim-event

Conversation

@rekmarks
Copy link
Copy Markdown
Member

@rekmarks rekmarks commented Aug 3, 2023

Explanation

Removes the Website Accessed window.web3 Shim event from the metamask_logWeb3ShimUsage RPC method implementation. The method itself displays an alert to the user if a website attempts to access the window.web3 shim, which we replaced the original, functional window.web3 object with after said object was removed. This seems potentially useful, because we still get 5-star reviews on the legacy web3 extension.

The associated metrics event, on the other hand, is useless. It is rife with false positives, and doesn't tell us anything that we can't learn from download data for the legacy web3 extension. It's time to get rid of it.

There are no associated tests for this functionality.

Pre-merge reviewer checklist

  • Manual testing (e.g. pull and build branch, run in browser, test code being changed)
  • PR is linked to the appropriate GitHub issue
  • IF this PR fixes a bug in the release milestone, add this PR to the release milestone

If further QA is required (e.g. new feature, complex testing steps, large refactor), add the Extension QA Board label.

In this case, a QA Engineer approval will be be required.

@rekmarks rekmarks requested a review from a team as a code owner August 3, 2023 04:50
@rekmarks
Copy link
Copy Markdown
Member Author

rekmarks commented Aug 3, 2023

Idk if we have this event on mobile but we should remove it there as well.

@rekmarks rekmarks added the team-extension-platform Extension Platform team label Aug 23, 2023
@codecov
Copy link
Copy Markdown

codecov bot commented Aug 23, 2023

Codecov Report

Merging #20376 (1ed1afd) into develop (b852556) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff            @@
##           develop   #20376   +/-   ##
========================================
  Coverage    68.78%   68.78%           
========================================
  Files          994      994           
  Lines        38625    38623    -2     
  Branches     10367    10367           
========================================
- Hits         26565    26564    -1     
+ Misses       12060    12059    -1     
Files Changed Coverage Δ
...-method-middleware/handlers/log-web3-shim-usage.js 41.18% <100.00%> (-0.93%) ⬇️

@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [1ed1afd]
Page Load Metrics (1586 ± 50 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint111161132147
domContentLoaded14341878158610349
load14341879158610350
domInteractive14341878158610349
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -334 Bytes (-0.01%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@rekmarks rekmarks merged commit 4a93163 into develop Aug 24, 2023
@rekmarks rekmarks deleted the remove-web3-shim-event branch August 24, 2023 05:42
@github-actions github-actions bot locked and limited conversation to collaborators Aug 24, 2023
@metamaskbot metamaskbot added the release-11.1.0 Issue or pull request that will be included in release 11.1.0 label Aug 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-11.1.0 Issue or pull request that will be included in release 11.1.0 team-extension-platform Extension Platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants