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

Allow for metamask: schemed URLs #2719

Merged
merged 29 commits into from
Sep 24, 2024
Merged

Allow for metamask: schemed URLs #2719

merged 29 commits into from
Sep 24, 2024

Conversation

hmalik88
Copy link
Contributor

@hmalik88 hmalik88 commented Sep 12, 2024

Validation logic has been updated to allow for an Icon to also be included as a Link child. A new URL scheme is also introduced metamask: (see SIP-22), this scheme will allow a snap to navigate to the extension and other snap pages through a metamask: schemed URL.

@hmalik88 hmalik88 requested a review from a team as a code owner September 12, 2024 12:54
ritave
ritave previously approved these changes Sep 12, 2024
Copy link

codecov bot commented Sep 12, 2024

Codecov Report

Attention: Patch coverage is 98.14815% with 1 line in your changes missing coverage. Please review.

Project coverage is 94.37%. Comparing base (3a7cc20) to head (11bfb5b).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ntrollers/src/interface/SnapInterfaceController.ts 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2719      +/-   ##
==========================================
+ Coverage   94.35%   94.37%   +0.01%     
==========================================
  Files         476      477       +1     
  Lines       10139    10183      +44     
  Branches     1542     1555      +13     
==========================================
+ Hits         9567     9610      +43     
- Misses        572      573       +1     

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

@ritave
Copy link
Member

ritave commented Sep 12, 2024

What happens if there's a <Button form="asd" navigateTo="home" />

Copy link
Member

@Mrtenz Mrtenz left a comment

Choose a reason for hiding this comment

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

Blocking this as this requires further discussion.

@hmalik88 hmalik88 changed the title Add navigation to Button component Allow for metamask: schemed URLs Sep 13, 2024
packages/snaps-sdk/src/jsx/components/Link.ts Outdated Show resolved Hide resolved
packages/snaps-utils/src/url.test.ts Show resolved Hide resolved
packages/snaps-utils/src/url.test.ts Show resolved Hide resolved
packages/snaps-utils/src/url.ts Outdated Show resolved Hide resolved
packages/snaps-utils/src/ui.tsx Outdated Show resolved Hide resolved
packages/snaps-utils/src/url.ts Outdated Show resolved Hide resolved
packages/snaps-utils/src/url.ts Outdated Show resolved Hide resolved
packages/snaps-utils/src/url.ts Outdated Show resolved Hide resolved
packages/snaps-utils/src/url.ts Outdated Show resolved Hide resolved
packages/snaps-utils/src/url.ts Outdated Show resolved Hide resolved
packages/snaps-utils/src/url.ts Outdated Show resolved Hide resolved
packages/snaps-utils/src/url.ts Outdated Show resolved Hide resolved
packages/snaps-utils/src/url.ts Outdated Show resolved Hide resolved
packages/snaps-utils/src/url.ts Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
Mrtenz
Mrtenz previously approved these changes Sep 24, 2024
@hmalik88 hmalik88 merged commit 8b194d6 into main Sep 24, 2024
165 checks passed
@hmalik88 hmalik88 deleted the hm/add-navigation-to-button branch September 24, 2024 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants