Update client.go

Bug fixed : if hitting return instead of filling with a valid value, the CLI crashed (line 796)
Change return err by continue to ask a valid value again
This commit is contained in:
Florian Ruen 2022-02-17 17:35:33 +01:00 committed by GitHub
parent 5e4e7c6d34
commit 6d32a2f299
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -795,14 +795,17 @@ uiLoop:
case "find-count":
afmt.Print("Deals to make (1): ")
dealcStr, _, err := rl.ReadLine()
if err != nil {
printErr(xerrors.Errorf("reading deal count: %w", err))
continue
}
dealCount, err = strconv.ParseInt(string(dealcStr), 10, 64)
if err != nil {
return err
printErr(xerrors.Errorf("reading deal count: invalid number"))
continue
}
color.Blue(".. Picking miners")