Cleanup lint

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
This commit is contained in:
Jakub Sztandera 2019-07-18 17:44:10 +02:00
parent 710f87fdf4
commit 6496805cc3

View File

@ -185,16 +185,24 @@ func (w *Wallet) GenerateKey(typ string) (address.Address, error) {
if err != nil {
return address.Undef, err
}
ki := types.KeyInfo{
Type: typ,
PrivateKey: priv,
}
k, err = NewKey(types.KeyInfo{typ, priv})
k, err = NewKey(ki)
if err != nil {
return address.Undef, err
}
case KTBLS:
priv := bls.PrivateKeyGenerate()
ki := types.KeyInfo{
Type: typ,
PrivateKey: priv[:],
}
var err error
k, err = NewKey(types.KeyInfo{typ, priv[:]})
k, err = NewKey(ki)
if err != nil {
return address.Undef, err
}