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

Improve messages for generate-key #786

Closed
volovyks opened this issue Jun 5, 2021 · 3 comments
Closed

Improve messages for generate-key #786

volovyks opened this issue Jun 5, 2021 · 3 comments

Comments

@volovyks
Copy link
Collaborator

volovyks commented Jun 5, 2021

When we run near generate key <accId> --seedPhease=<seed> we are always getting Account has existing key pair with ed25519:<pk> public key. It happens even when account Id and pk are not in our local storage.

Another issue:
When we run simple near generate-key <acc-name> we are getting Key pair with ed25519:<pk> public key for an account "<acc>" which is not very informative. Let's explain user where this key is stored.

Another issue:
When the key is already stored - we are getting the same message Account has existing key pair with XXX, but the existing key is replaced with the generated one. So.. the user can lose his private key. The user should be prompted that the key will be overwriteen.

@volovyks volovyks added P2 Medium priority and removed good first issue Good for newcomers low-hanging-fruit P3 labels Oct 5, 2021
@june07
Copy link
Contributor

june07 commented Jan 13, 2022

Ditto. This seems like very poor wording...
"Account has existing key pair"

Although yes, the account does JUST NOW after running the generate-key command, have an "existing" key pair... but existing in this context makes it seem like a different key pair existed before the command was run.

Maybe something along the lines of "Key pair has been generated" or some such...

This should be a relatively easy fix... anyone able to provide feedback on different verbiage?

june07 added a commit to june07/near-cli that referenced this issue Jan 13, 2022
@lostpebble
Copy link

I'm new to Near development and just encountered this in the CLI. It was very confusing, as the account doesn't even exist on the blockchain yet (just used some random unique name)- and I was generating a key for the first time from a random seed phrase.

It was even more confusing, because just before this I had used a seed phrase with an account that does exist (but wasn't in my local ~/near-credentials folder yet)- and I got the same message, which I assumed it was telling me that this key pair already existed for this account, as if it did a check on the blockchain. But its still a confusing message to get, because that has nothing to do with the fact that we're adding the key locally now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

4 participants