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

Handle all well-known domains in canister id resolution #2392

Merged
merged 1 commit into from
Apr 2, 2024

Conversation

frederikrothenberger
Copy link
Member

@frederikrothenberger frederikrothenberger commented Mar 27, 2024

This makes the canister id resolution function more versatile to also take advantage of the canister id subdomain for other well-known domains (apart from localhost).


🟡 Some screens were changed

This makes the canister id resolution function more versatile to also
take advantage of the canister id subdomain for other well-known domains
(apart from `localhost`).
Copy link
Collaborator

@lmuntaner lmuntaner left a comment

Choose a reason for hiding this comment

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

LGTM! Minor comment.

const wellKnownDomains = [
"ic0.app",
"icp0.io",
"icp0.io",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is this duplicated?

Copy link
Member Author

Choose a reason for hiding this comment

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

To make the test fail in case somebody accidentally changes the list in the production code. If somebody intentionally changes the list, they will most likely also look to change the test.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sorry, I don't understand it. What does it help to have it twice?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, sorry. I thought you meant why have the list separately in the production and test code. I did not realized I actually duplicated a value in the list here. Fixed in #2397.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks!

@frederikrothenberger frederikrothenberger added this pull request to the merge queue Apr 2, 2024
Merged via the queue into main with commit 0ae81ba Apr 2, 2024
65 checks passed
@frederikrothenberger frederikrothenberger deleted the frederik/parsable-urls branch April 2, 2024 07:37
frederikrothenberger added a commit that referenced this pull request Apr 2, 2024
This fixes an error introduced in #2392 that duplicates a domain
in a test for canister id resolution.
github-merge-queue bot pushed a commit that referenced this pull request Apr 2, 2024
This fixes an error introduced in #2392 that duplicates a domain
in a test for canister id resolution.
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