Browse Source

Minor cleanup

pull/1782/head
Ethan Frey 7 years ago
parent
commit
2649c056cd
2 changed files with 5 additions and 4 deletions
  1. +2
    -1
      Makefile
  2. +3
    -3
      keys/keybase.go

+ 2
- 1
Makefile View File

@ -56,11 +56,12 @@ metalinter_test: ensure_tools
--enable=structcheck \
--enable=unconvert \
--enable=unused \
--enable=vetshadow \
--enable=vet \
--enable=varcheck \
./...
# --enable=vetshadow \ <= doesn't like assert := assert.New(t)
#--enable=dupl \
#--enable=errcheck \
#--enable=goimports \


+ 3
- 3
keys/keybase.go View File

@ -222,11 +222,11 @@ func generate(algo string, secret []byte) (crypto.PrivKey, error) {
func generateByType(typ byte, secret []byte) (crypto.PrivKey, error) {
switch typ {
case crypto.TypeEd25519:
return generate(crypto.NameEd25519, secret)
return crypto.GenPrivKeyEd25519FromSecret(secret).Wrap(), nil
case crypto.TypeSecp256k1:
return generate(crypto.NameSecp256k1, secret)
return crypto.GenPrivKeySecp256k1FromSecret(secret).Wrap(), nil
case nano.TypeLedgerEd25519:
return generate(nano.NameLedgerEd25519, secret)
return nano.NewPrivKeyLedgerEd25519Ed25519()
default:
err := errors.Errorf("Cannot generate keys for algorithm: %X", typ)
return crypto.PrivKey{}, err


Loading…
Cancel
Save