aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/puppeth
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-06-23 18:34:21 +0800
committerPéter Szilágyi <peterke@gmail.com>2017-06-23 18:34:21 +0800
commit5603eb911602c4527c6633c1ce2c3de65f8100fe (patch)
tree570f2a318f101e694ef9625adb80669241550d7e /cmd/puppeth
parent78c04c920d07e65864f781fb5c6e5d77435d7aa0 (diff)
downloaddexon-5603eb911602c4527c6633c1ce2c3de65f8100fe.tar.gz
dexon-5603eb911602c4527c6633c1ce2c3de65f8100fe.tar.zst
dexon-5603eb911602c4527c6633c1ce2c3de65f8100fe.zip
cmd/puppeth: fix key reuse during faucet deploys
Diffstat (limited to 'cmd/puppeth')
-rw-r--r--cmd/puppeth/wizard_faucet.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/cmd/puppeth/wizard_faucet.go b/cmd/puppeth/wizard_faucet.go
index 66ec98c73..51c4e2f7f 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()