From a3ce03179894ddb6701e852e564abb2fba5bc4f8 Mon Sep 17 00:00:00 2001 From: Samer Afach Date: Tue, 6 Feb 2024 16:40:35 +0400 Subject: [PATCH] Hide hex signing and verification commands --- wallet/wallet-cli-lib/src/commands/mod.rs | 2 ++ wallet/wallet-cli-lib/src/repl/interactive/mod.rs | 1 + 2 files changed, 3 insertions(+) diff --git a/wallet/wallet-cli-lib/src/commands/mod.rs b/wallet/wallet-cli-lib/src/commands/mod.rs index 5e2f83bf86..170a711d5a 100644 --- a/wallet/wallet-cli-lib/src/commands/mod.rs +++ b/wallet/wallet-cli-lib/src/commands/mod.rs @@ -200,6 +200,7 @@ pub enum ColdWalletCommand { /// Signs a challenge with a private key corresponding to the provided address destination. #[clap(name = "account-sign-challenge-hex")] + #[clap(hide = true)] SignChallegeHex { /// Hex encoded message to be signed message: String, @@ -218,6 +219,7 @@ pub enum ColdWalletCommand { /// Verifies a signed challenge against an address destination #[clap(name = "verify-challenge-hex")] + #[clap(hide = true)] VerifyChallengeHex { /// The hex encoded message that was signed message: String, diff --git a/wallet/wallet-cli-lib/src/repl/interactive/mod.rs b/wallet/wallet-cli-lib/src/repl/interactive/mod.rs index 7bd18d39f5..dd1cc5e425 100644 --- a/wallet/wallet-cli-lib/src/repl/interactive/mod.rs +++ b/wallet/wallet-cli-lib/src/repl/interactive/mod.rs @@ -49,6 +49,7 @@ fn create_line_editor( ) -> Result> { let commands = repl_command .get_subcommands() + .filter(|command| !command.is_hide_set()) .map(|command| command.get_name().to_owned()) .chain(std::iter::once("help".to_owned())) .collect::>();