From 2649c056cd37716ab7f9dcea759874d97c22870a Mon Sep 17 00:00:00 2001 From: Ethan Frey Date: Mon, 13 Nov 2017 14:54:14 +0100 Subject: [PATCH] Minor cleanup --- Makefile | 3 ++- keys/keybase.go | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index c1974c410..31ea0214a 100644 --- a/Makefile +++ b/Makefile @@ -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 \ diff --git a/keys/keybase.go b/keys/keybase.go index 14775060a..7f53b2979 100644 --- a/keys/keybase.go +++ b/keys/keybase.go @@ -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