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

feat: add bridge wallet action #7835

Merged
merged 12 commits into from
Nov 30, 2023
Merged

feat: add bridge wallet action #7835

merged 12 commits into from
Nov 30, 2023

Conversation

BZahory
Copy link
Contributor

@BZahory BZahory commented Nov 15, 2023

Description

Motivation

Organically exposing MetaMask Mobile users to MetaMask Bridges could contribute to a company-wide initiative to close the gap between our current and targeted revenue projections. Mobile users currently only contribute ~5% of MetaMask Portfolio transactions despite mobile users making up over 62% of page views; there is an opportunity to capture a vast and wildly underrepresented market here.

Solution

Add a MetaMask Bridges wallet action

Related issues

METABRIDGE-459

Manual testing steps

  1. Load MetaMask Mobile and set-up/create an account.
  2. Selected a supported MetaMask Bridges chain (e.g., Ethereum Mainnet)
  3. Tap on the wallet actions button on the bottom-middle of the home screen
    • Verify that the "Bridge" row is present with a matching icon and description
  4. Tap on the "Bridge" row
    • Verify that MetaMask Bridges opens in the browser on the selected chain.
  5. Go back to the home screen
  6. Repeat steps 1-4
    • Verify that the existing tab is reopened in the browser.
  7. Switch to an unsupported MetaMask Bridges chain
  8. Verify that MetaMask Bridges is no longer an available wallet action

Screenshots/Recordings

Before

Screenshot 2023-11-21 at 5 45 10 PM

After

Screenshot 2023-11-21 at 5 46 50 PM

iPhone SE

Screenshot 2023-11-29 at 5 38 04 PM

Happy path flows

Screen.Recording.2023-11-22.at.10.05.27.AM.mov

Button does not show on unsupported bridge networks

Screen.Recording.2023-11-28.at.4.00.52.PM.mov

Opening bridge with MetaMask Portfolio, Uniswap, and a non-web3 tab open

Screen.Recording.2023-11-28.at.4.06.54.PM.mov

Restarting the app with the same tabs open

Screen.Recording.2023-11-28.at.4.10.35.PM.mov

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.

@BZahory BZahory requested a review from a team as a code owner November 15, 2023 20:37
Copy link
Contributor

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

@BZahory BZahory force-pushed the feat/bridge-button branch 2 times, most recently from 2a505f5 to 76ec629 Compare November 15, 2023 20:59
@BZahory
Copy link
Contributor Author

BZahory commented Nov 15, 2023

I have read the CLA Document and I hereby sign the CLA

@codecov-commenter
Copy link

codecov-commenter commented Nov 20, 2023

Codecov Report

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

Comparison is base (728ed44) 36.58% compared to head (7c0dab9) 36.60%.

Files Patch % Lines
app/components/UI/Bridge/utils/useGoToBridge.ts 66.66% 3 Missing and 2 partials ⚠️
app/components/UI/Bridge/utils/isBridgeAllowed.ts 75.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7835      +/-   ##
==========================================
+ Coverage   36.58%   36.60%   +0.02%     
==========================================
  Files        1082     1084       +2     
  Lines       29053    29075      +22     
  Branches     2653     2657       +4     
==========================================
+ Hits        10628    10644      +16     
- Misses      17827    17830       +3     
- Partials      598      601       +3     

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

app/constants/network.js Outdated Show resolved Hide resolved
app/components/UI/Bridge/utils/useGoToBridge.ts Outdated Show resolved Hide resolved
app/components/UI/Bridge/utils/useGoToBridge.ts Outdated Show resolved Hide resolved
app/components/UI/Bridge/utils/useGoToBridge.ts Outdated Show resolved Hide resolved
@BZahory BZahory marked this pull request as draft November 21, 2023 20:55
@BZahory BZahory changed the title draft: feat: add bridge token+wallet action feat: add bridge token+wallet action Nov 21, 2023
micaelae
micaelae previously approved these changes Nov 21, 2023
@BZahory BZahory changed the title feat: add bridge token+wallet action feat: add bridge wallet action Nov 21, 2023
@BZahory BZahory marked this pull request as ready for review November 21, 2023 23:39
Copy link
Contributor

E2E test started on Bitrise: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/6d667d93-5bb5-46fd-8293-800e380d1eed
You can also kick off another Bitrise E2E smoke test by removing and re-applying the (Run Smoke E2E) label

@hesterbruikman hesterbruikman added the design-review Any feature that needs feedback from the design team label Nov 22, 2023
@BZahory BZahory marked this pull request as draft November 22, 2023 20:16
@BZahory BZahory marked this pull request as ready for review November 28, 2023 19:30
Copy link
Contributor

E2E test started on Bitrise: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/3d2d5350-3db3-4453-aed4-f06f6a8f5ffc
You can also kick off another Bitrise E2E smoke test by removing and re-applying the (Run Smoke E2E) label

@BZahory BZahory mentioned this pull request Nov 29, 2023
13 tasks
BZahory added a commit that referenced this pull request Nov 29, 2023
## **Description**

<!--
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?
-->

Adds translations needed in #7835.

## **Related issues**


[METABRIDGE-459](https://consensyssoftware.atlassian.net/browse/METABRIDGE-459)

## **Manual testing steps**

1. Verify that translations are added for each supported language

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

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

- [ ] 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.
@BZahory BZahory marked this pull request as draft November 29, 2023 22:15
@BZahory BZahory marked this pull request as ready for review November 29, 2023 23:05
Copy link
Contributor

E2E test started on Bitrise: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/a49463f4-9bf4-4f76-98ec-7b13bc96b862
You can also kick off another Bitrise E2E smoke test by removing and re-applying the (Run Smoke E2E) label

Copy link

sonarcloud bot commented Nov 30, 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 2 Code Smells

80.0% 80.0% Coverage
0.0% 0.0% Duplication

@sethkfman sethkfman added the release-7.13.0 Issue or pull request that will be included in release 7.13.0 label Nov 30, 2023
Copy link
Contributor

@sethkfman sethkfman left a comment

Choose a reason for hiding this comment

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

LGTM

@BZahory BZahory merged commit c1922b5 into main Nov 30, 2023
28 checks passed
@BZahory BZahory deleted the feat/bridge-button branch November 30, 2023 18:57
@github-actions github-actions bot locked and limited conversation to collaborators Nov 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
design-review Any feature that needs feedback from the design team release-7.13.0 Issue or pull request that will be included in release 7.13.0 team-bridge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants