Skip to content
This repository was archived by the owner on Oct 4, 2024. It is now read-only.

Comments

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

Open
june07 wants to merge 2 commits intonear:masterfrom
june07:master
Open

Fix for https://github.com/near/near-cli/issues/786#913
june07 wants to merge 2 commits intonear:masterfrom
june07:master

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

.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.

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 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.

3 participants