diff --git a/bip39.go b/bip39.go index 2ef9833..dc49b73 100644 --- a/bip39.go +++ b/bip39.go @@ -104,7 +104,10 @@ func NewEntropy(bitSize int) ([]byte, error) { } entropy := make([]byte, bitSize/8) - _, _ = rand.Read(entropy) // err is always nil + _, err := rand.Read(entropy) + if err != nil { + return nil, err + } return entropy, nil }