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: Custom header for wallet initiated confirmations #27391

Merged
merged 5 commits into from
Oct 1, 2024

Conversation

pedronfigueiredo
Copy link
Contributor

@pedronfigueiredo pedronfigueiredo commented Sep 25, 2024

Description

The back button brings the user to the stepper for ERC20 token transfer.

This PR includes creating a placeholder component for token transfer confirmations. It also includes unit tests.

Open in GitHub Codespaces

Related issues

Fixes: https://github.com/MetaMask/MetaMask-planning/issues/3218

Manual testing steps

  1. Enable redesign on developer options.
  2. Initiate transfer from an erc20 token in the wallet.
  3. The confirmation in the screenshot below should appear.

Screenshots/Recordings

Before

After

Screenshot 2024-09-25 at 11 14 03

Pre-merge author checklist

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 the team-confirmations Push issues to confirmations team label Sep 25, 2024
@pedronfigueiredo pedronfigueiredo self-assigned this Sep 25, 2024
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.

Copy link

sonarcloud bot commented Sep 30, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
62.9% Coverage on New Code (required ≥ 80%)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

@metamaskbot
Copy link
Collaborator

Builds ready [0697807]
Page Load Metrics (1778 ± 106 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint153323451781210101
domContentLoaded151622761746209100
load152723521778220106
domInteractive16253646129
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 5.36 KiB (0.07%)
  • common: 64 Bytes (0.00%)

borderRadius={BorderRadius.MD}
marginRight={1}
>
<ButtonIcon
Copy link
Member

Choose a reason for hiding this comment

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

Minor, is there some duplication here with HeaderInfo, is it worth a AdvancedDetailsToggleButton component somewhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a good idea, I'll add it in the next PR

(currentConfirmation as TransactionMeta).origin === 'metamask';

if (isWalletInitiated) {
return <WalletInitiatedHeader />;
Copy link
Member

Choose a reason for hiding this comment

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

Minor, as an alternate to returning an enitrely separate component here, is there much overlap between the two headers such that it's worth just dynamically including the back button etc?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the components are sufficiently different to warrant separate components

@pedronfigueiredo pedronfigueiredo merged commit 80b85f4 into develop Oct 1, 2024
79 of 80 checks passed
@pedronfigueiredo pedronfigueiredo deleted the pnf/3218 branch October 1, 2024 08:45
@github-actions github-actions bot locked and limited conversation to collaborators Oct 1, 2024
@metamaskbot metamaskbot added the release-12.6.0 Issue or pull request that will be included in release 12.6.0 label Oct 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.6.0 Issue or pull request that will be included in release 12.6.0 team-confirmations Push issues to confirmations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants