diff options
author | Péter Szilágyi <peterke@gmail.com> | 2018-12-03 22:50:59 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2018-12-04 18:12:40 +0800 |
commit | d4415f5e40fbd155adb3e85e4eae5c7db7832694 (patch) | |
tree | 8488e9f090452b234a53e3dd346f2874f2bf0b57 /cmd/puppeth/wizard_faucet.go | |
parent | 8698fbabf6c7811e8eec6e84512510e9c9a4eb45 (diff) | |
download | dexon-d4415f5e40fbd155adb3e85e4eae5c7db7832694.tar dexon-d4415f5e40fbd155adb3e85e4eae5c7db7832694.tar.gz dexon-d4415f5e40fbd155adb3e85e4eae5c7db7832694.tar.bz2 dexon-d4415f5e40fbd155adb3e85e4eae5c7db7832694.tar.lz dexon-d4415f5e40fbd155adb3e85e4eae5c7db7832694.tar.xz dexon-d4415f5e40fbd155adb3e85e4eae5c7db7832694.tar.zst dexon-d4415f5e40fbd155adb3e85e4eae5c7db7832694.zip |
cmd/puppeth: chain import/export via wizard, minor polishes
Diffstat (limited to 'cmd/puppeth/wizard_faucet.go')
-rw-r--r-- | cmd/puppeth/wizard_faucet.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd/puppeth/wizard_faucet.go b/cmd/puppeth/wizard_faucet.go index 6f0840894..9068c1d30 100644 --- a/cmd/puppeth/wizard_faucet.go +++ b/cmd/puppeth/wizard_faucet.go @@ -81,7 +81,7 @@ func (w *wizard) deployFaucet() { if infos.captchaToken != "" { fmt.Println() fmt.Println("Reuse previous reCaptcha API authorization (y/n)? (default = yes)") - if w.readDefaultString("y") != "y" { + if !w.readDefaultYesNo(true) { infos.captchaToken, infos.captchaSecret = "", "" } } @@ -89,7 +89,7 @@ func (w *wizard) deployFaucet() { // No previous authorization (or old one discarded) fmt.Println() fmt.Println("Enable reCaptcha protection against robots (y/n)? (default = no)") - if w.readDefaultString("n") == "n" { + if !w.readDefaultYesNo(false) { log.Warn("Users will be able to requests funds via automated scripts") } else { // Captcha protection explicitly requested, read the site and secret keys @@ -132,7 +132,7 @@ func (w *wizard) deployFaucet() { } else { fmt.Println() fmt.Printf("Reuse previous (%s) funding account (y/n)? (default = yes)\n", key.Address.Hex()) - if w.readDefaultString("y") != "y" { + if !w.readDefaultYesNo(true) { infos.node.keyJSON, infos.node.keyPass = "", "" } } @@ -166,7 +166,7 @@ func (w *wizard) deployFaucet() { if existed { fmt.Println() fmt.Printf("Should the faucet be built from scratch (y/n)? (default = no)\n") - nocache = w.readDefaultString("n") != "n" + nocache = w.readDefaultYesNo(false) } if out, err := deployFaucet(client, w.network, w.conf.bootnodes, infos, nocache); err != nil { log.Error("Failed to deploy faucet container", "err", err) |