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

Fix for https://github.com/near/near-cli/issues/786 #913

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

june07
Copy link
Contributor

@june07 june07 commented Jan 13, 2022

If the seed phrase is used on the command line regardless of position, the seed-phrase middleware creates a key and adds it to the keystore. This change considers that fact and eliminates output of the confusing message.

Also added the seedPhrase yargs option as it seems to be supported per how things work and even per the comment here:

// near generate-key --seedPhrase="phrase"

@june07
Copy link
Contributor Author

june07 commented Jan 24, 2022

🎤 ✔️ 12...

@june07
Copy link
Contributor Author

june07 commented May 11, 2022

Any feedback on this one?

@willemneal
Copy link
Contributor

@volovyk-s

@@ -9,6 +9,10 @@ module.exports = {
.option('yolo', {
description: 'Do not ask for extra confirmation when using Ledger',
type: 'boolean',
})
Copy link
Collaborator

Choose a reason for hiding this comment

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

This option is already available on the top level. We should not add it here again.

@@ -36,7 +40,7 @@ module.exports = {

const { deps: { keyStore } } = near.config;
const existingKey = await keyStore.getKey(argv.networkId, argv.accountId);
if (existingKey) {
if (existingKey && !argv.seedPhrase) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

It will fix just 1 out of ~5 problems we have with generation keys. This is a critical please of code, so I would prefer to fix them all at once.

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.

None yet

3 participants