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

chore: cherry pick 7881 #7883

Merged
merged 2 commits into from
Nov 21, 2023
Merged

Conversation

sethkfman
Copy link
Contributor

Description

This PR was created to fix the issue [#7862], following code change has been done:

  1. Change the getKeyringByAddress() method to return undefined when address is not valid hex address (e.g. ENS domain name)
  2. Fix the existing unit tests to reflect above changes in address/index.test.ts file
  3. add extra unit tests to make sure function will return undefined when address is not valid hex address (e.g. ENS domain)

Related issues

Fixes: [#7862]

Manual testing steps

Please refer to following videos for detail how to test.

Screenshots/Recordings

Before

before.mp4

After

Screen_Recording_20231120_224005_MetaMask.mp4
  • 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".

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

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

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**


This PR was created to fix the issue [#7862], following code change has
been done:
1. Change the `getKeyringByAddress()` method to return undefined when
address is not valid hex address (e.g. ENS domain name)
2. Fix the existing unit tests to reflect above changes in
`address/index.test.ts` file
3. add extra unit tests to make sure function will return undefined when
address is not valid hex address (e.g. ENS domain)


## **Related issues**

Fixes: [#7862]

## **Manual testing steps**

Please refer to following videos for detail how to test.

## **Screenshots/Recordings**

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

### **Before**


https://github.com/MetaMask/metamask-mobile/assets/7315988/2c61515b-df26-460f-b2da-93fe6902e004


### **After**



https://github.com/MetaMask/metamask-mobile/assets/7315988/f8cf64bb-e323-452f-99be-0c3ffc99592f



- [x] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.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-mobile/blob/main/.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".

## **Pre-merge reviewer checklist**

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

---------

Co-authored-by: sethkfman <[email protected]>
Co-authored-by: Gustavo Antunes <[email protected]>
@sethkfman sethkfman added type-bug Something isn't working release-7.12.0 Issue or pull request that will be included in release 7.12.0 labels Nov 20, 2023
@sethkfman sethkfman requested a review from a team as a code owner November 20, 2023 19:46
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.

Copy link
Contributor

E2E test started on Bitrise: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/46e37cc6-b4e3-4b92-b4e4-0107e0a45166
You can also kick off another Bitrise E2E smoke test by removing and re-applying the (Run Smoke E2E) label

Copy link

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

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (922cd64) 37.38% compared to head (633b550) 37.38%.

Additional details and impacted files
@@               Coverage Diff               @@
##           release/7.12.0    #7883   +/-   ##
===============================================
  Coverage           37.38%   37.38%           
===============================================
  Files                1052     1052           
  Lines               28177    28177           
  Branches             2516     2516           
===============================================
  Hits                10534    10534           
  Misses              17044    17044           
  Partials              599      599           

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

Copy link
Contributor

@chrisleewilcox chrisleewilcox left a comment

Choose a reason for hiding this comment

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

LGTM

@chrisleewilcox chrisleewilcox merged commit d82bc55 into release/7.12.0 Nov 21, 2023
@chrisleewilcox chrisleewilcox deleted the chore/cherry-pick-7881- branch November 21, 2023 02:41
@github-actions github-actions bot locked and limited conversation to collaborators Nov 21, 2023
@chrisleewilcox chrisleewilcox added the regression-RC DEPRECATED: Please use "regresssion-RC-x.y.z" label instead label Nov 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
regression-RC DEPRECATED: Please use "regresssion-RC-x.y.z" label instead release-7.12.0 Issue or pull request that will be included in release 7.12.0 team-accounts type-bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants