Browse Source

cmd/puppeth: fix key reuse during faucet deploys

Péter Szilágyi 8 years ago
parent
commit
5603eb9116
1 changed files with 1 additions and 2 deletions
  1. 1 2
      cmd/puppeth/wizard_faucet.go

+ 1 - 2
cmd/puppeth/wizard_faucet.go

@@ -165,8 +165,7 @@ func (w *wizard) deployFaucet() {
 	}
 	// Load up the credential needed to release funds
 	if infos.node.keyJSON != "" {
-		var key keystore.Key
-		if err := json.Unmarshal([]byte(infos.node.keyJSON), &key); err != nil {
+		if key, err := keystore.DecryptKey([]byte(infos.node.keyJSON), infos.node.keyPass); err != nil {
 			infos.node.keyJSON, infos.node.keyPass = "", ""
 		} else {
 			fmt.Println()