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

Use name component in signature requests #20831

Merged
merged 24 commits into from
Sep 19, 2023

Conversation

matthewwalsh0
Copy link
Member

@matthewwalsh0 matthewwalsh0 commented Sep 12, 2023

Explanation

In the flask build type only, use the Name component to display addresses in typed V3 and V4 signature requests.

This enables the user to specify custom names for any of the signature request addresses, but also to select from a list of proposed names from multiple sources including ENS, Etherscan, Lens Protocol, and the blockchain itself.

Screenshots

Before

v3_previous v4_previous contract_details_previous

After

v3_new v4_new contract_details_new

Manual Testing Steps

  • Go to test dApp.
  • Click Sign under Sign Typed Data V3.
  • Verify new components are used for addresses.
  • Click address and save a custom name.
  • Verify custom name is visible in new component.
  • Repeat for Sign Typed Data V4.

Pre-merge author checklist

  • I've clearly explained:
    • What problem this PR is solving
    • How this problem was solved
    • How reviewers can test my changes
  • Sufficient automated test coverage has been added

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.

@github-actions
Copy link
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.

@matthewwalsh0 matthewwalsh0 changed the base branch from develop to feat/name-component September 12, 2023 11:55
@codecov
Copy link

codecov bot commented Sep 13, 2023

Codecov Report

Patch coverage: 67.57% and project coverage change: -0.01% ⚠️

Comparison is base (73466bc) 68.26% compared to head (4f56098) 68.25%.
Report is 1 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #20831      +/-   ##
===========================================
- Coverage    68.26%   68.25%   -0.01%     
===========================================
  Files         1002     1003       +1     
  Lines        40133    40151      +18     
  Branches     10742    10743       +1     
===========================================
+ Hits         27395    27402       +7     
- Misses       12738    12749      +11     
Files Changed Coverage Δ
ui/hooks/usePetnamesEnabled.ts 0.00% <0.00%> (ø)
...t/signature-request-data/signature-request-data.js 94.74% <66.67%> (-5.26%) ⬇️
app/scripts/metamask-controller.js 53.92% <76.00%> (-0.07%) ⬇️
...s/contract-details-modal/contract-details-modal.js 68.00% <80.00%> (-0.09%) ⬇️

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

@metamaskbot
Copy link
Collaborator

Builds ready [c5fdaca]
Page Load Metrics (1600 ± 42 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint108184132168
domContentLoaded1495177415998842
load1495177516008842
domInteractive1495177415998842
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 91 Bytes (0.00%)
  • ui: 33.74 KiB (0.41%)
  • common: 1.28 KiB (0.03%)

@matthewwalsh0 matthewwalsh0 marked this pull request as ready for review September 13, 2023 13:37
@matthewwalsh0 matthewwalsh0 requested review from a team as code owners September 13, 2023 13:37
@metamaskbot
Copy link
Collaborator

Builds ready [6534103]
Page Load Metrics (1843 ± 88 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint125177157147
domContentLoaded15722202184318388
load15722202184318388
domInteractive15722202184318388
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 91 Bytes (0.00%)
  • ui: 33.75 KiB (0.41%)
  • common: 1.28 KiB (0.03%)

OGPoyraz
OGPoyraz previously approved these changes Sep 13, 2023
vinistevam
vinistevam previously approved these changes Sep 14, 2023
@sleepytanya
Copy link
Contributor

sleepytanya commented Sep 14, 2023

Works great for me.
Creating custom name for signature request address video:

12.mov

Base automatically changed from feat/name-component to develop September 18, 2023 09:13
@matthewwalsh0 matthewwalsh0 dismissed stale reviews from vinistevam and OGPoyraz September 18, 2023 09:13

The base branch was changed.

@matthewwalsh0 matthewwalsh0 requested a review from a team as a code owner September 18, 2023 09:13
@matthewwalsh0 matthewwalsh0 added the team-confirmations-system DEPRECATED: please use "team-confirmations" label instead label Sep 18, 2023
@metamaskbot
Copy link
Collaborator

Builds ready [4f56098]
Page Load Metrics (1555 ± 74 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint111162139136
domContentLoaded14001932155415374
load14001932155515474
domInteractive14001932155415374
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 14.51 KiB (0.18%)
  • common: 0 Bytes (0.00%)

@matthewwalsh0 matthewwalsh0 merged commit db37487 into develop Sep 19, 2023
@matthewwalsh0 matthewwalsh0 deleted the feat/signature-names-flask branch September 19, 2023 10:22
@github-actions github-actions bot locked and limited conversation to collaborators Sep 19, 2023
@metamaskbot metamaskbot added the release-11.3.0 Issue or pull request that will be included in release 11.3.0 label Sep 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-11.3.0 Issue or pull request that will be included in release 11.3.0 team-confirmations-system DEPRECATED: please use "team-confirmations" label instead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants