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

fix: Verify third party details causes to watch the asset undesirably #7410

Merged
merged 3 commits into from
Oct 10, 2023

Conversation

blackdevelopa
Copy link
Contributor

@blackdevelopa blackdevelopa commented Oct 6, 2023

Description

When approving a token and you click on Verify third party details it adds the token to the wallet. This PR prevents calling addToken on the token approve screen.

Manual testing steps

  1. Go to the test dapp
  2. Deploy an ERC721/ERC20 token
  3. Click Approve
  4. Click Verify Third party details
  5. Cancel
  6. Go to the Home wallet
  7. You shouldn't see a new token added to your wallet.

Screenshots/Recordings

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

Bitrise: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/e072c203-f63d-4115-bf86-768408fe083e

Before

verify-3rd-party-details.mp4

After

Screen.Recording.2023-10-06.at.18.25.05.mov

Related issues

_Fixes #7178

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained:
    • What problem this PR is solving.
    • How this problem was solved.
    • How reviewers can test my changes.
  • I’ve indicated what issue this PR is linked to: Fixes #???
  • I’ve included tests if applicable.
  • I’ve documented any added code.
  • I’ve applied the right labels on the PR (see labeling guidelines).
  • 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".

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.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2023

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.

@blackdevelopa blackdevelopa added the team-confirmations-secure-ux-PR PR from the confirmations team label Oct 6, 2023
@blackdevelopa blackdevelopa self-assigned this Oct 9, 2023
@blackdevelopa blackdevelopa changed the title fix Verify third party details causes to watch the asset undesirably fix: Verify third party details causes to watch the asset undesirably Oct 9, 2023
@blackdevelopa blackdevelopa added the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Oct 9, 2023
@codecov-commenter
Copy link

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (24b4b7e) 34.61% compared to head (726d395) 34.61%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7410   +/-   ##
=======================================
  Coverage   34.61%   34.61%           
=======================================
  Files        1017     1017           
  Lines       27162    27161    -1     
  Branches     2211     2211           
=======================================
  Hits         9402     9402           
+ Misses      17273    17272    -1     
  Partials      487      487           
Files Coverage Δ
...roveTransactionHeader/ApproveTransactionHeader.tsx 74.41% <100.00%> (ø)
...nents/hooks/useAddressBalance/useAddressBalance.ts 80.43% <100.00%> (ø)
...pp/components/UI/ApproveTransactionReview/index.js 3.86% <0.00%> (+0.01%) ⬆️

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

@blackdevelopa blackdevelopa marked this pull request as ready for review October 9, 2023 09:50
@blackdevelopa blackdevelopa requested a review from a team as a code owner October 9, 2023 09:50
@blackdevelopa blackdevelopa removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Oct 9, 2023
@seaona
Copy link
Contributor

seaona commented Oct 10, 2023

hey @blackdevelopa the PR looks good from QA, I see the issue fixed 🔥
Could you add the Bitrise run link for e2e test? so we can merge it after tests pass 🙏 thank you

watch-asset-fixed.mp4

@seaona seaona added the QA Passed A successful QA run through has been done label Oct 10, 2023
@blackdevelopa
Copy link
Contributor Author

@seaona thanks. Done here

@sonarcloud
Copy link

sonarcloud bot commented Oct 10, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

87.5% 87.5% Coverage
0.0% 0.0% Duplication

@blackdevelopa blackdevelopa merged commit f1389e2 into main Oct 10, 2023
39 checks passed
@blackdevelopa blackdevelopa deleted the 7178/verify_contract_adds_token branch October 10, 2023 15:15
@github-actions github-actions bot locked and limited conversation to collaborators Oct 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
QA Passed A successful QA run through has been done release-7.10.0 team-confirmations-secure-ux-PR PR from the confirmations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants