Skip to content

Commit

Permalink
Remove useless for loop
Browse files Browse the repository at this point in the history
  • Loading branch information
jrick committed Dec 7, 2021
1 parent 623c1fc commit 28c8ade
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions walletsetup.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,17 +194,14 @@ func createSimulationWallet(ctx context.Context, cfg *config) error {

// promptHDPublicKey prompts the user for an extended public key.
func promptHDPublicKey(reader *bufio.Reader) (string, error) {
for {
fmt.Print("Enter HD wallet public key: ")
keyString, err := reader.ReadString('\n')
if err != nil {
return "", err
}

keyStringTrimmed := strings.TrimSpace(keyString)

return keyStringTrimmed, nil
fmt.Print("Enter HD wallet public key: ")
keyString, err := reader.ReadString('\n')
if err != nil {
return "", err
}

keyStringTrimmed := strings.TrimSpace(keyString)
return keyStringTrimmed, nil
}

// createWatchingOnlyWallet creates a watching only wallet using the passed
Expand Down

0 comments on commit 28c8ade

Please sign in to comment.