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 send max to send flow #12754

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

Conversation

OGPoyraz
Copy link
Member

@OGPoyraz OGPoyraz commented Dec 18, 2024

Description

This PR implements "Use Max" feature to the send flow.

In the Amount step we set maxValueMode as true. When user gets in to the Confirm step, depending on the value, transaction value is getting updated.

Related issues

#8516

Manual testing steps

  1. Try send eth - initiate from wallet
  2. "Use max" value on the Amount screen
  3. See that amount is adjusted on every gas update

Screenshots/Recordings

send.flow.max.eth.mp4

Before

After

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.

@metamaskbot metamaskbot added the team-confirmations Push issues to confirmations team label Dec 18, 2024
@OGPoyraz OGPoyraz changed the title fix: Fix send max eth feature feat: Implement send max to send flow Dec 18, 2024
@OGPoyraz OGPoyraz added Run Smoke E2E Triggers smoke e2e on Bitrise No QA Needed Apply this label when your PR does not need any QA effort. labels Dec 18, 2024
@MetaMask MetaMask deleted a comment from github-actions bot Dec 18, 2024
@OGPoyraz OGPoyraz added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Dec 18, 2024
Copy link
Contributor

github-actions bot commented Dec 18, 2024

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 39d4b19
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/f359a44f-8410-444e-a52c-33313a225d90

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

@OGPoyraz OGPoyraz added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Dec 18, 2024
@OGPoyraz OGPoyraz marked this pull request as ready for review December 18, 2024 14:06
@OGPoyraz OGPoyraz requested review from a team as code owners December 18, 2024 14:06
Copy link
Contributor

github-actions bot commented Dec 18, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: f33da7b
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/540f6c09-a304-4fad-bd5d-05821ba0b536

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

@@ -604,14 +629,33 @@ class Confirm extends PureComponent {
? AppConstants.GAS_OPTIONS.MEDIUM
: this.state.gasSelected;

if (
maxValueMode &&
selectedAsset.isETH &&
Copy link
Member Author

Choose a reason for hiding this comment

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

This is always set to true regardless of the network using ETH or not, so a flag if the selected asset is native token

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. 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.

[Bug]: When sending 'max' amount ETH value is not adjusted in response to changes in the gas fee.
3 participants