-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 Network URL non-ascii -> punycode warning #12813
Conversation
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. |
Bitrise✅✅✅ Commit hash: b51117b Note
|
Bitrise✅✅✅ Commit hash: 3e2aac9 Note
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I notice the following notice in the punycode README: https://github.com/mathiasbynens/punycode.js?tab=readme-ov-file#installation
⚠️ Note that userland modules don't hide core modules. For example, require('punycode') still imports the deprecated core module even if you executed npm install punycode. Use require('punycode/') to import userland modules rather than core modules.
We should double check to ensure we are using the punycode built into node which is soft-deprecated. I notice other files like this one import punycode as the following:
import punycode from 'punycode/punycode'; |
Bitrise❌❌❌ Commit hash: f891d73 Note
Tip
|
Quality Gate passedIssues Measures |
Bitrise❌❌❌ Commit hash: 6f2aef1 Note
Tip
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice workaround 👍
Description
Similar to the extension, we want to warn the user if the URL has non-ASCII characters. Inline alerts are not supported on mobile, so we display the new alert as a banner.
Notes:
Related issues
Fixes: https://github.com/MetaMask/MetaMask-planning/issues/2365
Related to: MetaMask/metamask-extension#29490 (fixes isValidASCIIURL to include path check in extension)
Manual testing steps
Test switching to a custom network
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist