Skip to content

feat: Create info component for contract interactions#24131

Merged
pedronfigueiredo merged 5 commits intodevelopfrom
pnf/23944
Apr 26, 2024
Merged

feat: Create info component for contract interactions#24131
pedronfigueiredo merged 5 commits intodevelopfrom
pnf/23944

Conversation

@pedronfigueiredo
Copy link
Copy Markdown
Contributor

@pedronfigueiredo pedronfigueiredo commented Apr 19, 2024

Description

Adds support for transactionType.contractInteraction on the redesign routes and creates the new component.

Open in GitHub Codespaces

Related issues

Fixes: #23944

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.

@pedronfigueiredo pedronfigueiredo self-assigned this Apr 19, 2024
@pedronfigueiredo pedronfigueiredo requested review from a team as code owners April 19, 2024 14:34
@github-actions
Copy link
Copy Markdown
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.

@pedronfigueiredo pedronfigueiredo changed the title Create info component for contract interactions feat: Create info component for contract interactions Apr 19, 2024
@pedronfigueiredo pedronfigueiredo force-pushed the pnf/23944 branch 5 times, most recently from 5efa7d9 to 052be40 Compare April 19, 2024 17:52
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [052be40]
Page Load Metrics (1311 ± 653 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint653911378340
domContentLoaded10121312411
load52307313111360653
domInteractive10121312411
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 2.24 KiB (0.03%)
  • common: 0 Bytes (0.00%)

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 19, 2024

Codecov Report

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

Project coverage is 67.46%. Comparing base (bf946dc) to head (63c2096).

Files Patch % Lines
...ges/confirmations/components/confirm/info/info.tsx 50.00% 1 Missing ⚠️
...ts/confirm/signature-message/signature-message.tsx 0.00% 1 Missing ⚠️
...ages/confirmations/hooks/useCurrentConfirmation.ts 50.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #24131   +/-   ##
========================================
  Coverage    67.45%   67.46%           
========================================
  Files         1258     1259    +1     
  Lines        49236    49244    +8     
  Branches     12819    12821    +2     
========================================
+ Hits         33212    33218    +6     
- Misses       16024    16026    +2     

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

jpuri
jpuri previously approved these changes Apr 22, 2024
Copy link
Copy Markdown
Contributor

@jpuri jpuri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@pedronfigueiredo pedronfigueiredo force-pushed the pnf/23944 branch 2 times, most recently from 2dfd037 to a8cfcda Compare April 22, 2024 13:28
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [a8cfcda]
Page Load Metrics (1746 ± 595 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint743611578641
domContentLoaded11147423316
load62328717461238595
domInteractive11147423316
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 2.24 KiB (0.03%)
  • common: 0 Bytes (0.00%)

@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [63c2096]
Page Load Metrics (1492 ± 683 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint742191233818
domContentLoaded10452494
load60333714921423683
domInteractive10452494
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 2.24 KiB (0.03%)
  • common: 0 Bytes (0.00%)

@@ -13,7 +16,9 @@ type SignatureSecurityAlertResponsesState = {

// todo: this component can be deleted once new alert imlementation is added
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

title: 'Components/App/Confirm/info/ContractInteractionInfo',
component: ContractInteractionInfo,
decorators: [
(story: () => any) => <Provider store={store}>{story()}</Provider>,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: To avoid using any we could cast the Story object: as Meta<typeof ContractInteractionInfo>

Copy link
Copy Markdown
Contributor

@vinistevam vinistevam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great PR @pedronfigueiredo. Is this component already in use? I'm just asking because we could add some screenshots if not add those from the storybook.

<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

Updates footer, header and title files to accept transaction
confirmations

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/24168?quickstart=1)

## **Related issues**

Fixes: #23950

## **Manual testing steps**

1. Go to this page...
2.
3.

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [ ] 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](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
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.
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [a21b7ab]
Page Load Metrics (1344 ± 687 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint621701033316
domContentLoaded105817136
load50344113441430687
domInteractive105717136
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 3.19 KiB (0.05%)
  • common: 212 Bytes (0.00%)

@pedronfigueiredo
Copy link
Copy Markdown
Contributor Author

@vinistevam Thanks for the comments, I will address them in #24228

@pedronfigueiredo pedronfigueiredo merged commit 6eaca31 into develop Apr 26, 2024
@pedronfigueiredo pedronfigueiredo deleted the pnf/23944 branch April 26, 2024 13:03
@github-actions github-actions bot locked and limited conversation to collaborators Apr 26, 2024
@gauthierpetetin gauthierpetetin added the release-12.0.0 Issue or pull request that will be included in release 12.0.0 label Jun 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

confirmation-re-design confirmation-redesign release-12.0.0 Issue or pull request that will be included in release 12.0.0 team-confirmations-secure-ux-deprecated DEPRECATED: please use "team-confirmations" instead team-confirmations-secure-ux-PR PRs from the confirmations team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Tech Task] Create info component for contract interactions

5 participants