Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add flag -y as a shortcut for --skip-confirm #1127

Merged
merged 2 commits into from
Jun 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/cargo-contract/src/cmd/extrinsics/mod.rs
Original file line number Diff line number Diff line change
@@ -136,7 +136,7 @@ pub struct ExtrinsicOpts {
#[clap(long)]
skip_dry_run: bool,
/// Before submitting a transaction, do not ask the user for confirmation.
#[clap(long)]
#[clap(short('y'), long)]
skip_confirm: bool,
}

@@ -419,7 +419,7 @@ async fn state_call<A: Encode, R: Decode>(url: &str, func: &str, args: A) -> Res
/// Prompt the user to confirm transaction submission.
fn prompt_confirm_tx<F: FnOnce()>(show_details: F) -> Result<()> {
println!(
"{} (skip with --skip-confirm)",
"{} (skip with --skip-confirm or -y)",
"Confirm transaction details:".bright_white().bold()
);
show_details();