Recommend non-HD wallets (#7524)

* Recommend non-HD wallets

* Fix ordering

* set non-HD wallet as first option

* fix go fmt

* changed keymanager-types-Kind enum

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
This commit is contained in:
Potuz
2020-10-14 16:55:47 -03:00
committed by GitHub
parent e5ed2cd141
commit 76300cef09
3 changed files with 6 additions and 6 deletions

View File

@@ -57,8 +57,8 @@ var (
)
// KeymanagerKindSelections as friendly text.
KeymanagerKindSelections = map[v2keymanager.Kind]string{
v2keymanager.Derived: "HD Wallet (Recommended)",
v2keymanager.Direct: "Non-HD Wallet (Most Basic)",
v2keymanager.Direct: "Non-HD Wallet (Recommended)",
v2keymanager.Derived: "HD Wallet (Least secure)",
v2keymanager.Remote: "Remote Signing Wallet (Advanced)",
}
// ValidateExistingPass checks that an input cannot be empty.

View File

@@ -192,8 +192,8 @@ func inputKeymanagerKind(cliCtx *cli.Context) (v2keymanager.Kind, error) {
promptSelect := promptui.Select{
Label: "Select a type of wallet",
Items: []string{
wallet.KeymanagerKindSelections[v2keymanager.Derived],
wallet.KeymanagerKindSelections[v2keymanager.Direct],
wallet.KeymanagerKindSelections[v2keymanager.Derived],
wallet.KeymanagerKindSelections[v2keymanager.Remote],
},
}

View File

@@ -30,10 +30,10 @@ type Keystore struct {
type Kind int
const (
// Derived keymanager using a hierarchical-deterministic algorithm.
Derived Kind = iota
// Direct keymanager defines an on-disk, encrypted keystore-capable store.
Direct
Direct Kind = iota
// Derived keymanager using a hierarchical-deterministic algorithm.
Derived
// Remote keymanager capable of remote-signing data.
Remote
)