From 5603eb911602c4527c6633c1ce2c3de65f8100fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Fri, 23 Jun 2017 13:34:21 +0300 Subject: [PATCH] cmd/puppeth: fix key reuse during faucet deploys --- cmd/puppeth/wizard_faucet.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/puppeth/wizard_faucet.go b/cmd/puppeth/wizard_faucet.go index 66ec98c73b..51c4e2f7f4 100644 --- a/cmd/puppeth/wizard_faucet.go +++ b/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()