From 4419b8ca808217c1776954e9f36c8f14914b56d6 Mon Sep 17 00:00:00 2001 From: Assaf Morami Date: Wed, 18 Dec 2024 20:12:01 +0200 Subject: [PATCH] improve bool parsing for enabled flag --- x/auction/client/cli/tx.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/x/auction/client/cli/tx.go b/x/auction/client/cli/tx.go index dda0a8c4e..6db8f1992 100644 --- a/x/auction/client/cli/tx.go +++ b/x/auction/client/cli/tx.go @@ -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 {