Skip to content

feat: Add max value refresher for transfer redesigned confirmations #15074

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

OGPoyraz
Copy link
Member

@OGPoyraz OGPoyraz commented May 2, 2025

Description

This PR aims to add max value refresher hook into transfer confirmations.

Essentially hook is updating transaction value via updateEditableParams. After design discussions - every update should pulse the TokenHero component. Hence this PR also moves animated-pulse component in to UI components and re-use that.

Regarding changes in animated-pulse: it appears if isPulsing changing too fast it stops animation. Hence there are modifications in animated-pulse component but it's basically making sure pulse animation at least done twice.

Related issues

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

Manual testing steps

Only possible to test it out via setting FEATURE_FLAG_REDESIGNED_TRANSFER to true

Screenshots/Recordings

Before

After

max.value.update.pulse.mp4

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.

@OGPoyraz OGPoyraz added No QA Needed Apply this label when your PR does not need any QA effort. no-changelog Indicates no external facing user changes, therefore no changelog documentation needed labels May 2, 2025
@OGPoyraz OGPoyraz requested a review from a team as a code owner May 2, 2025 11:44
@metamaskbot metamaskbot added the team-confirmations Push issues to confirmations team label May 2, 2025
@OGPoyraz OGPoyraz added the Run Smoke E2E Triggers smoke e2e on Bitrise label May 2, 2025
Copy link
Contributor

github-actions bot commented May 2, 2025

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: e6f9a52
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/07ab2712-0537-45e4-a570-201176277575

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

Copy link
Member Author

Choose a reason for hiding this comment

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

Not going to add any test for this file since it just does the animation - we may ask for some reusable component from DS as described here #13117

@OGPoyraz OGPoyraz added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels May 2, 2025
Copy link
Contributor

github-actions bot commented May 2, 2025

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 9366295
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/7012197a-6b31-45db-8066-6296387a8430

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 86.41975% with 11 lines in your changes missing coverage. Please review.

Project coverage is 67.78%. Comparing base (f518fc9) to head (08cc1e0).
Report is 40 commits behind head on main.

Files with missing lines Patch % Lines
...ns/components/UI/animated-pulse/animated-pulse.tsx 79.48% 6 Missing and 2 partials ⚠️
...text/confirmation-context/confirmation-context.tsx 81.81% 1 Missing and 1 partial ⚠️
.../Views/confirmations/hooks/useMaxValueRefresher.ts 95.45% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #15074      +/-   ##
==========================================
- Coverage   67.84%   67.78%   -0.07%     
==========================================
  Files        2343     2346       +3     
  Lines       50476    50678     +202     
  Branches     7452     7497      +45     
==========================================
+ Hits        34246    34351     +105     
- Misses      14062    14143      +81     
- Partials     2168     2184      +16     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
No QA Needed Apply this label when your PR does not need any QA effort. no-changelog Indicates no external facing user changes, therefore no changelog documentation needed Run Smoke E2E Triggers smoke e2e on Bitrise team-confirmations Push issues to confirmations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants