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

Add Redesign Signature Decoding Simulation tests #13023

Closed
9 tasks
digiwand opened this issue Jan 16, 2025 · 0 comments · Fixed by #13026
Closed
9 tasks

Add Redesign Signature Decoding Simulation tests #13023

digiwand opened this issue Jan 16, 2025 · 0 comments · Fixed by #13026
Assignees
Labels
release-7.39.0 Issue or pull request that will be included in release 7.39.0 team-confirmations Push issues to confirmations team

Comments

@digiwand
Copy link
Contributor

digiwand commented Jan 16, 2025

What is this about?

As a follow-up for #12994, we want to create supporting tests. Please also refer to the Codecov Report #12994 (comment)

Scenario

No response

Design

No response

Technical Details

No response

Threat Modeling Framework

No response

Acceptance Criteria

No response

Stakeholder review needed before the work gets merged

  • Engineering (needed in most cases)
  • Design
  • Product
  • QA (automation tests are required to pass before merging PRs but not all changes are covered by automation tests - please review if QA is needed beyond automation tests)
  • Security
  • Legal
  • Marketing
  • Management (please specify)
  • Other (please specify)

References

No response

@digiwand digiwand added the team-confirmations Push issues to confirmations team label Jan 16, 2025
@digiwand digiwand self-assigned this Jan 16, 2025
github-merge-queue bot pushed a commit that referenced this issue Jan 16, 2025
## **Description**

Add Signature Decoding Simulation UI

This logic mirrors the extension with slight modifications due to
mobile/extension parity differences.

In addition: 
- updated ValueDisplay value logic to no longer use useMemo

Todo in follow-up PRs: 
- Add additional tests
#13023
- Add "Unlimited" text support
#13022
- Investigate "useExternalServices" setting. This does not seem to exist
in mobile #13024

## **Related issues**

Fixes: MetaMask/MetaMask-planning#3876
Related: #12994
(Replaces Ramp/Box usages with View)

## **Manual testing steps**

1. Set REDESIGNED_SIGNATURE_REQUEST to true in js.env
2. Enable confirmation_redesign in Launch Darkly
3. Turn on Improved Signatures setting
4. Turn on Simulation setting
5. Test various v3 and v4 signTypedData signatures
- Example dapp: https://develop.d3bkcslj57l47p.amplifyapp.com/ → "Permit
2 - Single" button

## **Screenshots/Recordings**

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

### **Before**

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

### **After**
<img width="320"
src="https://github.com/user-attachments/assets/4b511681-66d3-47c4-8807-5ea227a9eaa9">
<img width="320"
src="https://github.com/user-attachments/assets/439477e6-b02f-4b46-9660-dd1e77d4df2a">

The values in this screenshot will be replaced by "Unlimited"
<img width="320"
src="https://github.com/user-attachments/assets/0f37d8cd-7817-4d88-a4ab-79356268265d">

## **Pre-merge author checklist**

- [ ] 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).
- [ ] 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](https://jsdoc.app/) format
if applicable
- [ ] 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.
github-merge-queue bot pushed a commit that referenced this issue Jan 16, 2025
## **Description**

Create Additional Tests for new Decoding Simulation feat

## **Related issues**

Fixes: #13023
Relates to: #12994

## **Manual testing steps**

1. Go to this page...
2.
3.

## **Screenshots/Recordings**

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

### **Before**

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

### **After**

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

## **Pre-merge author checklist**

- [ ] 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).
- [ ] 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](https://jsdoc.app/) format
if applicable
- [ ] 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.
@metamaskbot metamaskbot added the release-7.39.0 Issue or pull request that will be included in release 7.39.0 label Jan 16, 2025
nickewansmith pushed a commit that referenced this issue Jan 17, 2025
## **Description**

Add Signature Decoding Simulation UI

This logic mirrors the extension with slight modifications due to
mobile/extension parity differences.

In addition: 
- updated ValueDisplay value logic to no longer use useMemo

Todo in follow-up PRs: 
- Add additional tests
#13023
- Add "Unlimited" text support
#13022
- Investigate "useExternalServices" setting. This does not seem to exist
in mobile #13024

## **Related issues**

Fixes: MetaMask/MetaMask-planning#3876
Related: #12994
(Replaces Ramp/Box usages with View)

## **Manual testing steps**

1. Set REDESIGNED_SIGNATURE_REQUEST to true in js.env
2. Enable confirmation_redesign in Launch Darkly
3. Turn on Improved Signatures setting
4. Turn on Simulation setting
5. Test various v3 and v4 signTypedData signatures
- Example dapp: https://develop.d3bkcslj57l47p.amplifyapp.com/ → "Permit
2 - Single" button

## **Screenshots/Recordings**

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

### **Before**

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

### **After**
<img width="320"
src="https://github.com/user-attachments/assets/4b511681-66d3-47c4-8807-5ea227a9eaa9">
<img width="320"
src="https://github.com/user-attachments/assets/439477e6-b02f-4b46-9660-dd1e77d4df2a">

The values in this screenshot will be replaced by "Unlimited"
<img width="320"
src="https://github.com/user-attachments/assets/0f37d8cd-7817-4d88-a4ab-79356268265d">

## **Pre-merge author checklist**

- [ ] 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).
- [ ] 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](https://jsdoc.app/) format
if applicable
- [ ] 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.
nickewansmith pushed a commit that referenced this issue Jan 17, 2025
## **Description**

Create Additional Tests for new Decoding Simulation feat

## **Related issues**

Fixes: #13023
Relates to: #12994

## **Manual testing steps**

1. Go to this page...
2.
3.

## **Screenshots/Recordings**

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

### **Before**

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

### **After**

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

## **Pre-merge author checklist**

- [ ] 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).
- [ ] 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](https://jsdoc.app/) format
if applicable
- [ ] 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-7.39.0 Issue or pull request that will be included in release 7.39.0 team-confirmations Push issues to confirmations team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants