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

cli: connect after verifying args, not before #1006

Open
iancoleman opened this issue Nov 23, 2023 · 0 comments
Open

cli: connect after verifying args, not before #1006

iancoleman opened this issue Nov 23, 2023 · 0 comments

Comments

@iancoleman
Copy link
Contributor

To reproduce

safe files download <address>

Tries to connect (takes about 10s, quite a long time)

Shows error unrelated to network connection:

Error: 
   0: Both the name and address must be supplied if either are used

This error could be shown before connecting to the network.

It's a better ux to fail fast. It's less network load to avoid connection if it won't be used.

Main place to look at is sn_cli/src/main.rs L85-108

There's a similar ux concern with wallet commands, eg address and receive, which don't need a connection but will establish one anyway.

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

No branches or pull requests

1 participant