Skip to content

Commit

Permalink
Improve generated cli help (#581)
Browse files Browse the repository at this point in the history
  • Loading branch information
preston-evans98 authored Jul 31, 2023
1 parent 3835042 commit 168a508
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ pub const UPDATE_ACCOUNT_MSG: [u8; 32] = [1; 32];
pub enum CallMessage<C: sov_modules_api::Context> {
/// Updates a public key for the corresponding Account.
/// The sender must be in possession of the new key.
UpdatePublicKey(C::PublicKey, C::Signature),
UpdatePublicKey(
/// The new public key
C::PublicKey,
/// A valid signature from the new public key
C::Signature,
),
}

impl<C: sov_modules_api::Context> Accounts<C> {
Expand Down
2 changes: 2 additions & 0 deletions module-system/sov-modules-macros/src/cli_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ pub(crate) fn derive_cli_wallet_arg(
Fields::Unnamed(_) => {
variants_with_named_fields.push(quote! {
#( #variant_docs )*
#[command(arg_required_else_help(true))]
#variant_name {#(#named_variant_fields),* }
});
convert_cases.push(quote! {
Expand All @@ -215,6 +216,7 @@ pub(crate) fn derive_cli_wallet_arg(
Fields::Named(_) => {
variants_with_named_fields.push(quote! {
#( #variant_docs )*
#[command(arg_required_else_help(true))]
#variant_name {#(#named_variant_fields),* }
});
convert_cases.push(quote! {
Expand Down

0 comments on commit 168a508

Please sign in to comment.