From 6db31037cb17a3d9d355c317ea1e4fb8642ab581 Mon Sep 17 00:00:00 2001 From: grumbach Date: Fri, 3 Mar 2023 13:49:37 +0900 Subject: [PATCH] fix: cli wallet reason option --- sn_cli/src/subcommands/wallet.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sn_cli/src/subcommands/wallet.rs b/sn_cli/src/subcommands/wallet.rs index 20af1ef90b..a35015d7e4 100644 --- a/sn_cli/src/subcommands/wallet.rs +++ b/sn_cli/src/subcommands/wallet.rs @@ -77,7 +77,7 @@ pub enum WalletSubCommands { /// The reason why this DBC is spent /// (Used for data payments: currently not yet implemented) #[clap(long = "reason")] - reason: DbcReason, + reason: Option, }, } @@ -232,7 +232,9 @@ pub async fn wallet_commander( } else { None }; - let dbc = safe.wallet_reissue(&from, &amount, pk, reason).await?; + let dbc = safe + .wallet_reissue(&from, &amount, pk, reason.unwrap_or_default()) + .await?; let dbc_hex = dbc.to_hex()?; // Write the DBC to a file if the user requested it, but fall