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

Slow down URL validation when adding a network or RPC #1241

Conversation

greg-schrammel
Copy link
Contributor

Fixes BX-####
Figma link (if any):

What changed (plus any additional context for devs)

ups a bit the debounce delay and adds https:// to the url if needed

Screen recordings / screenshots

What to test

Copy link

linear bot commented Dec 19, 2023

Copy link

Here's the packed extension for this build:
rainbowbx-3eb0a8a8a415e209d6cb98d9dcb78446eaa339b0.zip

@@ -277,6 +277,8 @@ const KNOWN_NETWORKS = {
],
};

const parseURL = (url: string | undefined) =>
url && (url.startsWith('http') ? url : `https://${url}`);
Copy link
Member

Choose a reason for hiding this comment

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

If a user enters localhost:8545 you'll autocomplete it to https://localhost:8545 which won't work so we have 2 options:

  • Drop this and not add the prefix
  • Add an exception for hosts localhost & 127.0.0.1 where you only add http://

Copy link
Member

Choose a reason for hiding this comment

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

I'm removing it for now so I can merge it

@@ -277,6 +277,8 @@ const KNOWN_NETWORKS = {
],
};

const parseURL = (url: string | undefined) =>
url && (url.startsWith('http') ? url : `https://${url}`);
Copy link
Member

Choose a reason for hiding this comment

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

I'm removing it for now so I can merge it

Copy link

Here's the packed extension for this build:
rainbowbx-fa622ba9c57a4aba13c6b54f67917e66f7b57470.zip

Copy link

Here's the packed extension for this build:
rainbowbx-4fd0cda706e120c2877dc7ddbfbd3ab13ebfcc51.zip

Copy link

Here's the packed extension for this build:
node_modules.tar.gz
rainbowbx-eea109f18e51f914dfcf791a7eb5c794cdf200e5.zip

Copy link

Here's the packed extension for this build:
rainbowbx-eea109f18e51f914dfcf791a7eb5c794cdf200e5.zip

@brunobar79 brunobar79 merged commit 74cf978 into master Dec 19, 2023
17 checks passed
@brunobar79 brunobar79 deleted the gregs/bx-1197-slow-down-url-validation-when-adding-a-network-or-rpc branch December 19, 2023 23:50
Copy link

Here's the packed extension for this build:
rainbowbx-74cf9781c3e4577da7848ed9d4b65b54a58cd4e8.zip

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