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

cherry-pick: Adds confirmation screen for 'increaseAllowance' (#23560) #23883

Merged
merged 4 commits into from
Apr 10, 2024

Conversation

pedronfigueiredo
Copy link
Contributor

@pedronfigueiredo pedronfigueiredo commented Apr 8, 2024

NOTE: This PR is blocked by changes to core
repo
as well as to the test dApp first.

Reuses the token approve confirmation screen for 'increaseAllowance'. It also includes an e2e test for the complete flow.

Open in GitHub Codespaces

Fixes:
#2224

  1. Go to the test dApp
  2. Create a token
  3. Approve token for a small amount
  4. Try to transfer a higher amount of tokens from another account. (it should fail)
  5. Go back to the first account and increase the allowance.
  6. Try to transfer again from the second account. (it should succeed)
Screenshot 2024-03-18 at 17 54 12 Screenshot 2024-03-18 at 17 54 38
  • I’ve followed MetaMask Coding Standards.

  • I've clearly explained what problem this PR is solving and how it is solved.

  • I've linked related issues

  • I've included manual testing steps

  • I've included screenshots/recordings if applicable

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

  • I’ve properly set the pull request status:

    • In case it's not yet "ready for review", I've set it to "draft".
  • In case it's "ready for review", I've changed it from "draft" to "non-draft".

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

Description

Open in GitHub Codespaces

Related issues

Fixes:

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

After

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 release-blocker This bug is blocking the next release team-confirmations-secure-ux-PR PRs from the confirmations team labels Apr 8, 2024
@pedronfigueiredo pedronfigueiredo self-assigned this Apr 8, 2024
@pedronfigueiredo pedronfigueiredo requested a review from a team as a code owner April 8, 2024 09:42
Copy link
Contributor

github-actions bot commented Apr 8, 2024

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.

@pedronfigueiredo pedronfigueiredo force-pushed the pnf/increase-allowance-cherry-pick branch from c736dd9 to ddc151a Compare April 8, 2024 09:57
@pedronfigueiredo pedronfigueiredo changed the title feat(): Adds confirmation screen for 'increaseAllowance' (#23560) cherry-pick: Adds confirmation screen for 'increaseAllowance' (#23560) Apr 8, 2024
@pedronfigueiredo pedronfigueiredo force-pushed the pnf/increase-allowance-cherry-pick branch from ddc151a to 8c4491b Compare April 8, 2024 11:37
@pedronfigueiredo
Copy link
Contributor Author

@metamaskbot update-policies

@metamaskbot
Copy link
Collaborator

Policies updated

@pedronfigueiredo pedronfigueiredo requested review from a team as code owners April 8, 2024 12:19
@pedronfigueiredo pedronfigueiredo force-pushed the pnf/increase-allowance-cherry-pick branch 2 times, most recently from b1e77dd to 27b6908 Compare April 8, 2024 16:49
@pedronfigueiredo
Copy link
Contributor Author

@metamaskbot update-policies

@metamaskbot
Copy link
Collaborator

Policies updated

@pedronfigueiredo pedronfigueiredo force-pushed the pnf/increase-allowance-cherry-pick branch from 6fe3bbb to 34b50f5 Compare April 9, 2024 12:48
@metamaskbot
Copy link
Collaborator

Builds ready [874039d]
Page Load Metrics (498 ± 406 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint71155972110
domContentLoaded105324115
load582349498846406
domInteractive105324115
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: -2.57 KiB (-0.07%)
  • ui: 6.56 KiB (0.09%)
  • common: 36.17 KiB (0.72%)

~**NOTE: This PR is blocked by [changes to core
repo](MetaMask/core#4069) as well as to the
[test dApp](MetaMask/test-dapp#304) first.**~

Reuses the token approve confirmation screen for 'increaseAllowance'. It
also includes an e2e test for the complete flow.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/23560?quickstart=1)

Fixes:
[#2224](MetaMask/MetaMask-planning#2224)

1. Go to the test dApp
2. Create a token
3. Approve token for a small amount
4. Try to transfer a higher amount of tokens from another account. (it
should fail)
5. Go back to the first account and increase the allowance.
6. Try to transfer again from the second account. (it should succeed)

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

<img width="472" alt="Screenshot 2024-03-18 at 17 54 12"
src="https://github.com/MetaMask/metamask-extension/assets/13814744/243a529b-4710-419b-8764-f2c06be5a903">

<img width="472" alt="Screenshot 2024-03-18 at 17 54 38"
src="https://github.com/MetaMask/metamask-extension/assets/13814744/03843cf3-477d-4dbb-8c24-ae3b808a766f">

- [x] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've clearly explained what problem this PR is solving and how it
is solved.
- [x] I've linked related issues
- [x] I've included manual testing steps
- [x] I've included screenshots/recordings if applicable
- [x] I’ve included tests if applicable
- [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
- [x] I’ve properly set the pull request status:
  - [x] In case it's not yet "ready for review", I've set it to "draft".
- [x] In case it's "ready for review", I've changed it from "draft" to
"non-draft".

- [x] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [x] 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 force-pushed the pnf/increase-allowance-cherry-pick branch from 874039d to c8c4474 Compare April 10, 2024 09:36
@danjm danjm merged commit 9e825e6 into Version-v11.14.0 Apr 10, 2024
58 of 61 checks passed
@danjm danjm deleted the pnf/increase-allowance-cherry-pick branch April 10, 2024 12:33
@github-actions github-actions bot locked and limited conversation to collaborators Apr 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-blocker This bug is blocking the next release 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.

3 participants