Skip to content
This repository has been archived by the owner on Jan 24, 2022. It is now read-only.

Add url and path properties to network config #1386

Merged
merged 2 commits into from
Jan 14, 2020

Conversation

spalladino
Copy link
Contributor

Add support for specifying an url entry with the full URL to the node. Also adds a new entry, path, that can be combined with host, protocol, and port, and makes port optional. Note that #1338 suggested accepting a path as part of the host, though this is not technically correct (hence the new path property).

Fixes #1338

@spalladino spalladino requested a review from nventuro January 14, 2020 16:13
Copy link
Contributor

@nventuro nventuro left a comment

Choose a reason for hiding this comment

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

Looks great! I love the refactor in getProvider, the old code was unnecessarily hard to read.

For future PRs, consider applying changes that greatly affect indentation (like the removal of the outer context blocks in the tests) in a separate commit: it otherwise makes reviewing the changes much harder.

@nventuro
Copy link
Contributor

With this change we can now use the CLI on public networks by connecting to Infura with no mnemonics (read-only) 🎊

@nventuro nventuro merged commit f978d32 into master Jan 14, 2020
@nventuro nventuro deleted the fix/wrong-provider-url-with-path-#1338 branch January 14, 2020 17:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provider URL is misconstructed when the host string includes a path
2 participants