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: hide internal transaction origins in confirmation views (#12100) #12179

Closed

Conversation

vinistevam
Copy link
Contributor

Description

This PR modifies the transaction confirmation flow to hide the origin display when transactions are generated internally by the wallet. Changes

  • Updated TransactionHeader and ApproveTransactionHeader components to conditionally render origin information
  • Added logic to identify internal origins.

Related issues

Fixes: #11919

Manual testing steps

Case 1

  1. Import a QR account
  2. Go to test dapp
  3. Perform a signature or transaction
  4. and click Confirm

Case 2

  1. Normal account , go to the test-dapp
  2. Click Set Approve for All

Screenshots/Recordings

Before

before

After

after

origin.pill.webm

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.

Description

Related issues

Fixes:

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

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.

<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**
This PR modifies the transaction confirmation flow to hide the origin
display when transactions are generated internally by the wallet.
**Changes**
- Updated `TransactionHeader` and `ApproveTransactionHeader` components
to conditionally render origin information
- Added logic to identify internal origins.

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

## **Related issues**

Fixes: #11919

## **Manual testing steps**

**Case 1**
1. Import a QR account
2. Go to test dapp
3. Perform a signature or transaction
4. and click `Confirm`

**Case 2**
1. Normal account , go to the test-dapp
2. Click `Set Approve for All`

## **Screenshots/Recordings**

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

### **Before**

<img
src="https://github.com/user-attachments/assets/0ae320e9-4f11-4f7d-9237-57b8442a1683"
alt="before" width="400"/>


<!-- [screenshots/recordings] -->

### **After**

<img
src="https://github.com/user-attachments/assets/b31254cf-0e91-401d-bdc0-c4afec979437"
alt="after" width="400"/>

[origin
pill.webm](https://github.com/user-attachments/assets/b15f2732-efc6-40cb-8a94-7dcae1e1b20e)


<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [x] I’ve followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [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-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
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.

---------

Co-authored-by: Matthew Walsh <matthew.walsh@consensys.net>
@vinistevam vinistevam added the team-confirmations Push issues to confirmations team label Nov 5, 2024
Copy link
Contributor

github-actions bot commented Nov 5, 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.

@vinistevam vinistevam marked this pull request as ready for review November 5, 2024 15:44
@vinistevam vinistevam requested review from a team as code owners November 5, 2024 15:44
Copy link

sonarqubecloud bot commented Nov 5, 2024

@vinistevam vinistevam closed this Nov 5, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Nov 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
team-confirmations Push issues to confirmations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant