From 6bfabebeaa929902293bb49f3e5835edf75c90f4 Mon Sep 17 00:00:00 2001 From: Carlos LopezDeLara Date: Wed, 28 Aug 2024 08:22:49 -0600 Subject: [PATCH 1/2] Fix treasury withdrawal. Make funds receiving address and amount mandatory Fixes https://github.com/IntersectMBO/cardano-cli/issues/876 --- .../src/Cardano/CLI/EraBased/Options/Governance/Actions.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Options/Governance/Actions.hs b/cardano-cli/src/Cardano/CLI/EraBased/Options/Governance/Actions.hs index 5b8908b744..f9fd2686e3 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Options/Governance/Actions.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Options/Governance/Actions.hs @@ -378,7 +378,7 @@ pGovernanceActionTreasuryWithdrawalCmd era = do <*> pStakeIdentifier (Just "deposit-return") <*> pAnchorUrl <*> pAnchorDataHash - <*> many ((,) <$> pStakeVerificationKeyOrHashOrFile (Just "funds-receiving") <*> pTransferAmt) + <*> some ((,) <$> pStakeVerificationKeyOrHashOrFile (Just "funds-receiving") <*> pTransferAmt) <*> optional pConstitutionScriptHash <*> pFileOutDirection "out-file" "Output filepath of the treasury withdrawal." ) From 052ce215a8fbee0b2f68e5788c69741d6c966383 Mon Sep 17 00:00:00 2001 From: Carlos LopezDeLara Date: Wed, 28 Aug 2024 08:34:59 -0600 Subject: [PATCH 2/2] update golden files --- cardano-cli/test/cardano-cli-golden/files/golden/help.cli | 4 ++-- .../conway_governance_action_create-treasury-withdrawal.cli | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help.cli index 25db8fed13..89bc48f9a4 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help.cli @@ -6855,12 +6855,12 @@ Usage: cardano-cli conway governance action create-treasury-withdrawal ) --anchor-url TEXT --anchor-data-hash HASH - [ + ( ( --funds-receiving-stake-verification-key STRING | --funds-receiving-stake-verification-key-file FILE | --funds-receiving-stake-key-hash HASH ) - --transfer LOVELACE] + --transfer LOVELACE) [--constitution-script-hash HASH] --out-file FILE diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_governance_action_create-treasury-withdrawal.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_governance_action_create-treasury-withdrawal.cli index 7851673945..58341fbea1 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_governance_action_create-treasury-withdrawal.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_governance_action_create-treasury-withdrawal.cli @@ -11,12 +11,12 @@ Usage: cardano-cli conway governance action create-treasury-withdrawal ) --anchor-url TEXT --anchor-data-hash HASH - [ + ( ( --funds-receiving-stake-verification-key STRING | --funds-receiving-stake-verification-key-file FILE | --funds-receiving-stake-key-hash HASH ) - --transfer LOVELACE] + --transfer LOVELACE) [--constitution-script-hash HASH] --out-file FILE