Skip to content

Commit

Permalink
refactored ViewAccountSummary
Browse files Browse the repository at this point in the history
  • Loading branch information
FroVolod committed Jun 29, 2023
1 parent 5fb1bc4 commit 3a0d673
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/commands/account/view_account_summary/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use crate::common::RpcQueryResponseExt;
#[interactive_clap(input_context = crate::GlobalContext)]
#[interactive_clap(output_context = ViewAccountSummaryContext)]
pub struct ViewAccountSummary {
#[interactive_clap(skip_default_input_arg)]
/// What Account ID do you need to view?
account_id: crate::types::account_id::AccountId,
#[interactive_clap(named_arg)]
Expand Down Expand Up @@ -73,3 +74,14 @@ impl From<ViewAccountSummaryContext> for crate::network_view_at_block::ArgsForVi
item.0
}
}

impl ViewAccountSummary {
pub fn input_account_id(
context: &crate::GlobalContext,
) -> color_eyre::eyre::Result<Option<crate::types::account_id::AccountId>> {
crate::common::input_account_id_from_used_account_list(
context,
"What Account ID do you need to view?",
)
}
}

0 comments on commit 3a0d673

Please sign in to comment.