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: improve the URL validation and error handling in 'parseDeeplink' Method #9236

Merged
merged 3 commits into from
Apr 16, 2024

Conversation

omridan159
Copy link
Contributor

@omridan159 omridan159 commented Apr 15, 2024

Description

*This is a fix to this Issue: https://github.com/MetaMask/mobile-planning/issues/1520

This pull request enhances the parseDeeplink method by adding robust URL validation and error handling.
Key improvements include:

  • URL Validation: Ensures only correctly formatted URLs are processed to prevent errors during deep linking.
  • Error Handling: Captures exceptions with updated error handling, and alerting users to invalid URLs via a react-native alert.

These updates aim to improve the security and user experience by preventing the processing of malformed URLs and providing immediate feedback on errors.

Related issues

Fixes:

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

Available in this Issue:
https://github.com/MetaMask/mobile-planning/issues/1520

After

Screen.Recording.2024-04-15.at.11.14.37.mov

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • 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 format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). 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.

@omridan159 omridan159 requested a review from a team as a code owner April 15, 2024 10:20
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.

@omridan159 omridan159 added needs-qa Any New Features that needs a full manual QA prior to being added to a release. team-sdk SDK team labels Apr 15, 2024
@christopherferreira9 christopherferreira9 added the Run Smoke E2E Triggers smoke e2e on Bitrise label Apr 15, 2024
Copy link
Contributor

github-actions bot commented Apr 15, 2024

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 3e149cc
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/c11d02b2-7825-4509-a47d-f3da347d18d1

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@christopherferreira9 christopherferreira9 added QA in Progress QA has started on the feature. and removed needs-qa Any New Features that needs a full manual QA prior to being added to a release. labels Apr 15, 2024
Copy link

sonarcloud bot commented Apr 16, 2024

@christopherferreira9 christopherferreira9 added Run Smoke E2E Triggers smoke e2e on Bitrise QA Passed A successful QA run through has been done and removed Run Smoke E2E Triggers smoke e2e on Bitrise QA in Progress QA has started on the feature. labels Apr 16, 2024
@christopherferreira9
Copy link
Contributor

All good in QA.
Tested on both iOS and Android:

Copy link
Contributor

github-actions bot commented Apr 16, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 7ba1ec1
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/3b1ee3a3-f960-4b08-a915-3200f83a27df

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@christopherferreira9 christopherferreira9 merged commit 7d02a47 into main Apr 16, 2024
39 checks passed
@christopherferreira9 christopherferreira9 deleted the feat_validate-broken-deeplinks branch April 16, 2024 16:37
@github-actions github-actions bot locked and limited conversation to collaborators Apr 16, 2024
@metamaskbot metamaskbot added the release-7.22.0 Issue or pull request that will be included in release 7.22.0 label Apr 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
QA Passed A successful QA run through has been done release-7.22.0 Issue or pull request that will be included in release 7.22.0 Run Smoke E2E Triggers smoke e2e on Bitrise team-sdk SDK team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants