From 0f6d2938d3b9a73479d53f3b60dbb4ac4c26cd25 Mon Sep 17 00:00:00 2001 From: Rongjian Lan Date: Sat, 8 Sep 2018 15:04:49 -0700 Subject: [PATCH] Add error when privateKey is not specificed --- client/wallet/main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/wallet/main.go b/client/wallet/main.go index 4ae2a7c67..b90762ea2 100644 --- a/client/wallet/main.go +++ b/client/wallet/main.go @@ -75,6 +75,10 @@ func main() { case "import": accountImportCommand.Parse(os.Args[3:]) priKey := *accountImportPtr + if priKey == "" { + fmt.Println("Error: --privateKey is required") + return + } if !accountImportCommand.Parsed() { fmt.Println("Failed to parse flags") }