Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Enable private key import in initial wallet creation #815

Merged
merged 18 commits into from
Aug 25, 2021

Conversation

superboyiii
Copy link
Member

@superboyiii superboyiii commented Aug 17, 2021

Close #814
Require neo-project/neo#2580

@erikzhang
Copy link
Member

If there is no address in the wallet, the password is removed too.

@superboyiii
Copy link
Member Author

superboyiii commented Aug 18, 2021

If there is no address in the wallet, the password is removed too.

No, wallet need password, it's a container which is for later import. Like a server, even no app is running, you should set up username and password first.

@erikzhang
Copy link
Member

The password is not stored in the wallet, but is used to encrypt the private keys. If you remove all the addresses, then the password is removed from the wallet too.

@superboyiii
Copy link
Member Author

superboyiii commented Aug 18, 2021

The password is not stored in the wallet, but is used to encrypt the private keys. If you remove all the addresses, then the password is removed from the wallet too.

How about asking double confirm password when open an empty wallet? I'm worried about someone use an incorrect password to open the wallet and import a real privatekey, then the incorrect password becomes the correct.

@shargon
Copy link
Member

shargon commented Aug 19, 2021

@superboyiii why you need an empty wallet?

@superboyiii
Copy link
Member Author

@superboyiii why you need an empty wallet?

Someone imports Neo Legacy's privatekey to N3 wallet but have to create an unused address as the default address, it's strange.
Mostly, importing private key doesn't need any default address in wallet.

@superboyiii
Copy link
Member Author

@erikzhang @shargon Could you review again? I make a double pwd check when open an empty wallet in case someone imports privatekey but forget the previous password.

@shargon
Copy link
Member

shargon commented Aug 20, 2021

@superboyiii maybe it's better to create a new command for import for neo legacy?

@superboyiii superboyiii changed the title Enable empty wallet creation. Enable private key import in initial wallet creation Aug 23, 2021
@superboyiii
Copy link
Member Author

@erikzhang @shargon Pls review again.

neo-cli/CLI/MainService.Wallet.cs Outdated Show resolved Hide resolved
neo-cli/CLI/MainService.cs Outdated Show resolved Hide resolved
@superboyiii
Copy link
Member Author

@shargon @erikzhang Ready for review.

@superboyiii superboyiii merged commit 8f3fc01 into master Aug 25, 2021
@erikzhang erikzhang deleted the create-empty-wallet branch May 19, 2022 02:21
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.

No need to create an address as default when creating a new wallet
3 participants