Skip to content

Commit

Permalink
fix: Opensea Popup (#9514)
Browse files Browse the repository at this point in the history
<!--
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.
-->

Issue:
https://app.zenhub.com/workspaces/mobile-release-testing-6249e5242464b70013315a98/issues/gh/metamask/metamask-mobile/9443

As a partial fix to the issue above, this will allow users to not
encounter the reoccurring pop-up.

IMPORTANT: Accessing Opensea might still not always work, this fix will
allow users to not be blocked.


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

## **Related issues**

Fixes:

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


https://github.com/MetaMask/metamask-mobile/assets/15312578/abd704e6-7a35-4d3f-99dc-18cd1784073a

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

### **After**

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

Samsung Galaxy s21 ultra Android 13:
Prod v7.20.1

https://github.com/MetaMask/metamask-mobile/assets/15312578/194ef756-934b-4175-a515-d6a0dda00751

Release 7.22

https://github.com/MetaMask/metamask-mobile/assets/15312578/bd81eab5-4dce-4b03-99f5-7aa295a7e442



## **Pre-merge author checklist**

- [ ] I’ve followed [MetaMask 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.

---------

Co-authored-by: João Loureiro <1649425+jpcloureiro@users.noreply.github.com>
  • Loading branch information
MarioAslau and jpcloureiro authored May 2, 2024
1 parent e57f046 commit 6d9244e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/components/Views/BrowserTab/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -873,6 +873,7 @@ export const BrowserTab = (props) => {
// Continue request loading it the protocol is whitelisted
const { protocol } = new URL(url);
if (protocolAllowList.includes(protocol)) return true;
Logger.message(`Protocol not allowed ${protocol}`);

// If it is a trusted deeplink protocol, do not show the
// warning alert. Allow the OS to deeplink the URL
Expand All @@ -882,6 +883,9 @@ export const BrowserTab = (props) => {
return false;
}

// TODO: add logging for untrusted protocol being used
// Sentry
//
const alertMsg = getAlertMessage(protocol, strings);

// Pop up an alert dialog box to prompt the user for permission
Expand Down
1 change: 1 addition & 0 deletions app/util/browser/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ export const trustedProtocolToDeeplink = [
'metamask:',
'ethereum:',
'dapp:',
'market:',
];

/**
Expand Down

0 comments on commit 6d9244e

Please sign in to comment.