Skip to content

Commit

Permalink
improve bool parsing for enabled flag
Browse files Browse the repository at this point in the history
  • Loading branch information
assafmo committed Dec 18, 2024
1 parent 3f51aa6 commit 4419b8c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion x/auction/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,10 @@ Example:
return err
}

enabled := args[1] == "true"
enabled, err := strconv.ParseBool(args[1])
if err != nil {
return fmt.Errorf("cannot parse enabled as bool from '%s': %w", args[1], err)
}

minBidAmount, err := strconv.ParseUint(args[3], 10, 64)
if err != nil {
Expand Down

0 comments on commit 4419b8c

Please sign in to comment.