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(snaps-utils): Allow overriding allowed protocols in validateLink #2411

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

legobeat
Copy link
Contributor

By popular request, allow specifying custom protocols for link validation.

@legobeat legobeat requested a review from a team as a code owner May 15, 2024 22:10
@legobeat legobeat marked this pull request as draft May 15, 2024 22:27
@legobeat legobeat marked this pull request as ready for review May 15, 2024 22:33
Copy link

codecov bot commented May 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.27%. Comparing base (86afbcb) to head (f87425a).
Report is 1 commits behind head on main.

Current head f87425a differs from pull request most recent head d066a8c

Please upload reports for the commit d066a8c to get more accurate results.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2411   +/-   ##
=======================================
  Coverage   94.27%   94.27%           
=======================================
  Files         435      435           
  Lines        8942     8942           
  Branches     1374     1376    +2     
=======================================
  Hits         8430     8430           
  Misses        512      512           

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

@FrederikBolding
Copy link
Member

@legobeat What is the use-case here? 🤔

@@ -272,6 +272,7 @@ export class SnapInterfaceController extends BaseController<
);

await this.#triggerPhishingListUpdate();
// TODO: Expose configuration for allowedProtocols in validateJsxLinks
Copy link
Member

Choose a reason for hiding this comment

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

This change isn't very impactful until this is done, since all UI is converted to JSX as of recently.

isOnPhishingList,
maybeUpdatePhishingList,
}: NotifyMethodHooks,
allowedProtocols?: string[],
Copy link
Member

Choose a reason for hiding this comment

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

Does the PermissionController support this?

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.

2 participants