Add Opt-out Settings toggle for 4byte contract method names resolution#20098
Merged
Add Opt-out Settings toggle for 4byte contract method names resolution#20098
Conversation
Contributor
|
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. |
Codecov Report
@@ Coverage Diff @@
## develop #20098 +/- ##
===========================================
+ Coverage 68.82% 68.84% +0.02%
===========================================
Files 995 995
Lines 38239 38266 +27
Branches 10249 10250 +1
===========================================
+ Hits 26317 26342 +25
- Misses 11922 11924 +2
|
Collaborator
Builds ready [d1cf7b8]
Page Load Metrics (1922 ± 84 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
8419687 to
0f37bc8
Compare
Collaborator
Builds ready [0f37bc8]
Page Load Metrics (1552 ± 44 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
0f37bc8 to
1ca5140
Compare
Collaborator
Builds ready [1ca5140]
Page Load Metrics (1543 ± 39 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
1ca5140 to
bb4f6fb
Compare
Collaborator
Builds ready [bb4f6fb]
Page Load Metrics (1642 ± 124 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Collaborator
Builds ready [e9c060c]
Page Load Metrics (1691 ± 63 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
e9c060c to
6589511
Compare
Collaborator
Builds ready [6589511]
Page Load Metrics (1527 ± 21 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
78e8392 to
2868176
Compare
Collaborator
Builds ready [2868176]
Page Load Metrics (1539 ± 35 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Collaborator
Builds ready [8e2828b]
Page Load Metrics (2045 ± 55 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
darkwing
suggested changes
Jul 26, 2023
8e2828b to
e0beff1
Compare
Collaborator
Builds ready [e0beff1]
Page Load Metrics (1577 ± 55 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
e0beff1 to
b4f0a7e
Compare
Collaborator
Builds ready [b4f0a7e]
Page Load Metrics (1514 ± 54 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Collaborator
Builds ready [00c8de2]
Page Load Metrics (1533 ± 29 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
66ef6c3
a538205 to
66ef6c3
Compare
…tMethodDataAsync, removing unused useMethodData hook, adding clearKnownMethodData
66ef6c3 to
4fdfedb
Compare
pedronfigueiredo
approved these changes
Aug 4, 2023
darkwing
approved these changes
Aug 4, 2023
Collaborator
Builds ready [4fdfedb]
Page Load Metrics (1465 ± 25 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation
This change adds the option to disable contract method name resolution, which we retrieve through API calls to 4byte.directory. This new Opt-out should appear during onboarding and in the Privacy settings tab.
Fixes https://github.com/MetaMask/MetaMask-planning/issues/873
Progress: https://github.com/MetaMask/MetaMask-planning/issues/873#issuecomment-1640722284
See: Figma
Screenshots/Screencaps
Onboarding:
Extension Security&Privacy Settings:

Manual Testing Steps
"Decode smart contracts" setting ON:
Go to Test Dapp
Deploy a Piggybank contract
Click Deposit button
Verify that the contract method name shows as "DEPOSIT"
"Decode smart contracts" setting OFF:
Go to Privacy or Advanced Settings and turn off the "Decode smart contracts" setting
Go to Test Dapp
Deploy a Piggybank contract
Click Deposit button
Verify that the name does not appear and instead it shows as "CONTRACT INTERACTION"
Pre-merge author checklist
Pre-merge reviewer checklist
If further QA is required (e.g. new feature, complex testing steps, large refactor), add the
Extension QA Boardlabel.In this case, a QA Engineer approval will be be required.