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

feat: Implement transaction details component #24228

Merged
merged 9 commits into from May 3, 2024
Merged

Conversation

pedronfigueiredo
Copy link
Contributor

@pedronfigueiredo pedronfigueiredo commented Apr 24, 2024

Description

  • Implement transaction details component with 4byte method name resolution
  • Restyle the component conditionally

Open in GitHub Codespaces

Related issues

Fixes: #23945

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

After

Screenshot 2024-04-24 at 17 20 23

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 added team-confirmations-secure-ux DEPRECATED: please use "team-confirmations" label instead team-confirmations-secure-ux-PR PRs from the confirmations team confirmation-redesign confirmation-re-design team-confirmations Push issues to confirmations team labels Apr 24, 2024
@pedronfigueiredo pedronfigueiredo self-assigned this Apr 24, 2024
@pedronfigueiredo pedronfigueiredo requested review from a team as code owners April 24, 2024 16:17
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.

jpuri
jpuri previously approved these changes Apr 24, 2024
Copy link
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.

👍

Base automatically changed from pnf/23944 to develop April 26, 2024 13:03
@pedronfigueiredo pedronfigueiredo dismissed jpuri’s stale review April 26, 2024 13:03

The base branch was changed.

@pedronfigueiredo pedronfigueiredo force-pushed the pnf/23945 branch 10 times, most recently from 0ba1c4b to 8d26e10 Compare May 1, 2024 14:32
@metamaskbot
Copy link
Collaborator

Builds ready [8d26e10]
Page Load Metrics (360 ± 433 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint5911478147
domContentLoaded95814115
load473490360903433
domInteractive95814115
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 3.9 KiB (0.06%)
  • common: 442 Bytes (0.01%)

Copy link

codecov bot commented May 1, 2024

Codecov Report

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

Project coverage is 67.36%. Comparing base (4a1853c) to head (8d26e10).

❗ Current head 8d26e10 differs from pull request most recent head 4012ddf. Consider uploading reports for the commit 4012ddf to get more accurate results

Files Patch % Lines
...onents/confirm/info/shared/transaction-details.tsx 95.45% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #24228      +/-   ##
===========================================
- Coverage    67.37%   67.36%   -0.01%     
===========================================
  Files         1278     1278              
  Lines        49881    49766     -115     
  Branches     12944    12936       -8     
===========================================
- Hits         33605    33524      -81     
+ Misses       16276    16242      -34     

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

import configureMockStore from 'redux-mock-store';
import { genUnapprovedContractInteractionConfirmation } from '../../../../../../../test/data/confirmations/contract-interaction';
import mockState from '../../../../../../../test/data/mock-state.json';
import { renderWithProvider } from '../../../../../../../test/lib/render-helpers';
import ContractInteractionInfo from './contract-interaction';

describe('<ContractInteractionInfo />', () => {
const middleware = [thunk];

Copy link
Contributor

Choose a reason for hiding this comment

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

just curious - why is thunk middleware required here ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because useKnownMethodDataInTransaction, which is further down the component chain needs to be able to dispatch actions.

<OriginRow />
<RecipientRow />
<MethodDataRow />
</>
Copy link
Contributor

Choose a reason for hiding this comment

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

Later, it might be useful to extract these into their own components for re-use across confirmations

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed, although I haven't seen a use case for them outside transaction details on the designs yet.

jpuri
jpuri previously approved these changes May 1, 2024
@pedronfigueiredo pedronfigueiredo dismissed stale reviews from matthewwalsh0 and jpuri via b9dc87e May 2, 2024 13:47
@pedronfigueiredo pedronfigueiredo force-pushed the pnf/23945 branch 2 times, most recently from b9dc87e to 6c84c02 Compare May 2, 2024 13:49
matthewwalsh0
matthewwalsh0 previously approved these changes May 2, 2024
Copy link
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.

LGTM

@metamaskbot
Copy link
Collaborator

Builds ready [cbdf3d5]
Page Load Metrics (1050 ± 654 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint61174923215
domContentLoaded85415115
load49363310501361654
domInteractive85414115
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 3.93 KiB (0.06%)
  • common: 442 Bytes (0.01%)

@pedronfigueiredo pedronfigueiredo merged commit 011b772 into develop May 3, 2024
70 of 72 checks passed
@pedronfigueiredo pedronfigueiredo deleted the pnf/23945 branch May 3, 2024 16:21
@github-actions github-actions bot locked and limited conversation to collaborators May 3, 2024
@metamaskbot metamaskbot added the release-11.18.0 Issue or pull request that will be included in release 11.18.0 label May 3, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [b00c938]
Page Load Metrics (1520 ± 704 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint63149962613
domContentLoaded10431584
load51346515201467704
domInteractive10431584
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 3.93 KiB (0.06%)
  • common: 442 Bytes (0.01%)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
confirmation-re-design confirmation-redesign release-11.18.0 Issue or pull request that will be included in release 11.18.0 team-confirmations Push issues to confirmations team team-confirmations-secure-ux DEPRECATED: please use "team-confirmations" label 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] Implement info subsection for request provenance, contract petname and method name
5 participants