-
Notifications
You must be signed in to change notification settings - Fork 2
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
fix: trim trailing slash from custom rpc url #58
fix: trim trailing slash from custom rpc url #58
Conversation
|
thanks! i think instead of manipulating the input with a regex, which is unreliable and may be confusing to a user attempting to type in the input, we should use the browser's validation tools before testing and saving the url. on my phone at the moment, but something like additionally, we should look for code that concatenates URLs as strings, instead of using these tools which also provide correct path joining. this would be the true source of the double slash. |
Agree. the input is already marked as new URL('/one', 'http://example.com/').href which works with or without a trailing slash. |
4b17f04
to
66f334e
Compare
25dcc8c
to
4f437a7
Compare
@turbocrime requesting re-review, lmk if there's anything else I should change. @prax-wallet/web-reviewers also, thanks! |
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.
looks good to me
Fixes edge case where entering a custom RPC URL with a trailing slash will result in links in other parts of the app being broken.
@grod220 I couldn't find a corresponding test file for this form - should I create one?