From fc777bdc197a5e9caec7c46a354ef0fb37e54338 Mon Sep 17 00:00:00 2001 From: shum Date: Sat, 31 Oct 2026 08:50:49 +0000 Subject: [PATCH] store: show uses in the /issue menu hint --- apps/simplex-store-service/src/StoreService/Group/Command.hs | 2 +- tests/Bots/StoreService/GroupIntegrationTests.hs | 2 +- tests/Bots/StoreService/GroupTests.hs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/simplex-store-service/src/StoreService/Group/Command.hs b/apps/simplex-store-service/src/StoreService/Group/Command.hs index e473fab101..ae5d6629eb 100644 --- a/apps/simplex-store-service/src/StoreService/Group/Command.hs +++ b/apps/simplex-store-service/src/StoreService/Group/Command.hs @@ -158,7 +158,7 @@ cmdLabel = \case -- The menu hints and the usage replies are built from the same kinds, options and bounds, so they cannot drift apart. cmdParams :: CmdTag -> Text cmdParams = \case - CTIssue -> kindParams + CTIssue -> kindParams <> " [" <> optArg usesOpt <> "]" CTBulk -> kindParams <> " " <> optArg countOpt CTRevoke -> "" where diff --git a/tests/Bots/StoreService/GroupIntegrationTests.hs b/tests/Bots/StoreService/GroupIntegrationTests.hs index 8850b0c320..1e78d80f16 100644 --- a/tests/Bots/StoreService/GroupIntegrationTests.hs +++ b/tests/Bots/StoreService/GroupIntegrationTests.hs @@ -1578,7 +1578,7 @@ issueUsage = "Usage: /issue [] [years | months ] [uses -- The list is spelled out rather than taken from the service, so a change there fails here. expectedCommands :: [ChatBotCommand] expectedCommands = - [ CBCCommand "issue" "Generate a code" (Just "|supporter|legend|investor> [years|months ]"), + [ CBCCommand "issue" "Generate a code" (Just "|supporter|legend|investor> [years|months ] [uses ]"), CBCCommand "bulk" "Generate many codes" (Just "|supporter|legend|investor> [years|months ] count "), CBCCommand "revoke" "Revoke a code" (Just "") ] diff --git a/tests/Bots/StoreService/GroupTests.hs b/tests/Bots/StoreService/GroupTests.hs index e9494196a0..76fe7ccdc7 100644 --- a/tests/Bots/StoreService/GroupTests.hs +++ b/tests/Bots/StoreService/GroupTests.hs @@ -85,7 +85,7 @@ badgeGroupTests = describe "badge group" $ do ] it "advertises every kind of code in the issue and bulk menu entries" $ groupCommands - `shouldBe` [ CBCCommand "issue" "Generate a code" (Just "|supporter|legend|investor> [years|months ]"), + `shouldBe` [ CBCCommand "issue" "Generate a code" (Just "|supporter|legend|investor> [years|months ] [uses ]"), CBCCommand "bulk" "Generate many codes" (Just "|supporter|legend|investor> [years|months ] count "), CBCCommand "revoke" "Revoke a code" (Just "") ]