diff --git a/accounts/cmd.go b/accounts/cmd.go index c82fa7b4..fe3cefe1 100644 --- a/accounts/cmd.go +++ b/accounts/cmd.go @@ -8,7 +8,7 @@ import ( "github.com/ethereum/go-ethereum/accounts/keystore" "github.com/ethereum/go-ethereum/crypto" - "github.com/pborman/uuid" + "github.com/google/uuid" "github.com/spf13/cobra" ) @@ -66,7 +66,11 @@ func CreateGenerateKeyFileCommand() *cobra.Command { } // Create the keyfile object with a random UUID. - id := uuid.NewRandom() + id, idErr := uuid.NewRandom() + if idErr != nil { + fmt.Printf("Error generating UUID: %v", idErr) + return idErr + } key := &keystore.Key{ Id: id, Address: crypto.PubkeyToAddress(privateKey.PublicKey),