-
-
Save stefantalpalaru/3daccc359668c45267d091dd96667490 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -626,10 +626,10 @@ proc importKeystoresFromDir*(rng: var BrHmacDrbgContext, | |
fatal "Failed to access the imported deposits directory" | |
quit 1 | |
-template ask(prompt: string): string = | |
+template ask(destVar, prompt: untyped): untyped = | |
try: | |
stdout.write prompt, ": " | |
- stdin.readLine() | |
+ destVar = stdin.readLine() | |
except IOError: | |
return err "failure to read data from stdin" | |
@@ -662,8 +662,9 @@ proc pickPasswordAndSaveWallet(rng: var BrHmacDrbgContext, | |
"to continue with a machine-generated name." | |
echo "" | |
+ var enteredName: TaintedString | |
while true: | |
- var enteredName = ask "Wallet name" | |
+ ask(enteredName, "Wallet name") | |
if enteredName.len > 0: | |
name = | |
try: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment