Skip to content

User to be able to edit approval amount in simulation section of batched confirmation #15572

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 31 commits into
base: main
Choose a base branch
from

Conversation

jpuri
Copy link
Contributor

@jpuri jpuri commented May 23, 2025

Description

User to be able to edit approval amount in simulation section of batched confirmation

Related issues

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

Manual testing steps

  1. Enable 7702 locally
  2. Submit a batched approval
  3. Edit approval amount in simulation section, ensure it works as expected

Screenshots/Recordings

Screen.Recording.2025-05-23.at.6.08.34.PM.mov

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.

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.

@metamaskbot metamaskbot added the team-confirmations Push issues to confirmations team label May 23, 2025
@jpuri jpuri marked this pull request as ready for review May 23, 2025 12:40
@jpuri jpuri requested a review from a team as a code owner May 23, 2025 12:40
@jpuri jpuri force-pushed the simulation_section branch 2 times, most recently from 3fefddc to e42b19f Compare May 27, 2025 06:26
@jpuri jpuri requested review from a team as code owners May 27, 2025 06:26
Base automatically changed from simulation_section to main May 28, 2025 09:14
@jpuri jpuri enabled auto-merge May 28, 2025 11:05
Copy link

@jpuri jpuri added the Run Smoke E2E Requires smoke E2E testing label May 29, 2025
Copy link
Contributor

github-actions bot commented May 29, 2025

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: f1548dd
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/dd8d29b2-6bb8-486b-8177-d9e8ece9e4c3

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

@bschorchit bschorchit requested review from OGPoyraz and digiwand May 29, 2025 14:19
Copy link
Contributor

@digiwand digiwand left a comment

Choose a reason for hiding this comment

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

hey @jpuri, the new feature is looking great! a couple of requests and suggestions above

Comment on lines +3965 to +3970
"unavailable": "Unavailable",
"edit_approval_limit_title": "Edit approval limit",
"edit_approval_limit_description": "Enter the amount that you feel comfortable being spent on your behalf.",
"edit_approval_limit_balance_info": "Account balance:",
"cancel": "Cancel",
"save": "Save"
Copy link
Contributor

Choose a reason for hiding this comment

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

[nit] alphabetize

iconName={IconName.Edit}
size={ButtonIconSizes.Md}
onPress={openModal}
testID="edit-amount-button-icon"
Copy link
Contributor

Choose a reason for hiding this comment

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

Initially, the file path name "edit-row-value" suggests this could be a generic edit row component.

Based on the translation keys and methods, it combines the context of simulation and the amount. Can we rename the file path to provide more context?

If we plan for other edit row components, we could abstract the logic later to create a reusable component

Comment on lines +15 to +22
jest.mock('../../../../core/Engine', () => ({
context: {
TokenListController: {
fetchTokenList: jest.fn(),
},
},
}));

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
jest.mock('../../../../core/Engine', () => ({
context: {
TokenListController: {
fetchTokenList: jest.fn(),
},
},
}));

I think we can remove this after this PR was merged a few hours ago
#15843

will need to double-check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Run Smoke E2E Requires smoke E2E testing team-confirmations Push issues to confirmations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants