-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Add support for rpcUrl with basic auth when retrieving chainId on net… #9815
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. |
I have read the CLA Document and I hereby sign the CLA |
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.
Thank you for creating this PR.
Can you please confirm that my suggestion works and merge it? It will fix the lint failure.
It would also be helpful if you allowed edits from maintainers.
thanks @rekmarks for the review and suggested updates, I merged the changes and made a small update after testing the function inside browser console. |
@rekmarks for some reason I couldn't find the "Allow edits by maintainers" checkbox anymore which used to be under the "Participants" section 🤔 |
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.
LGTM!
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.
LGTM, great work!
…work creation
Fixes: #9791
Explanation: This new function to retrieve chainId on network creation does not take into account that
rpcUrl
may contain basic auth:https://<username>:<password>@permissioned.network
. Fix adds checking for the basic auth in the URL and adds basic auth to the header and adjust the rpcUrl passed towindow.fetch()
Manual testing steps:
https://<username>:<password>@permissioned.network
(exact value dependent on the permissioned network)Could not fetch chain ID. Is your RPC URL correct?