clap-utils: Allow nonce/offline args to be global (bp #12538)

This commit is contained in:
Trent Nelson
2020-09-28 20:59:37 -06:00
committed by mergify[bot]
parent 5ad5f8b458
commit 3781ad259b
5 changed files with 35 additions and 30 deletions

View File

@@ -2581,8 +2581,8 @@ pub fn app<'ab, 'v>(name: &str, about: &'ab str, version: &'v str) -> App<'ab, '
.long("cancelable")
.takes_value(false),
)
.offline_args()
.nonce_args()
.offline_args(false)
.nonce_args(false)
)
.subcommand(
SubCommand::with_name("resolve-signer")
@@ -2673,8 +2673,8 @@ pub fn app<'ab, 'v>(name: &str, about: &'ab str, version: &'v str) -> App<'ab, '
.takes_value(false)
.help("Return signature immediately after submitting the transaction, instead of waiting for confirmations"),
)
.offline_args()
.nonce_args()
.offline_args(false)
.nonce_args(false)
.arg(fee_payer_arg()),
)
.subcommand(

View File

@@ -154,8 +154,8 @@ impl StakeSubCommands for App<'_, '_> {
.validator(is_valid_signer)
.help("Source account of funds [default: cli config keypair]"),
)
.offline_args()
.nonce_args()
.offline_args(false)
.nonce_args(false)
.arg(fee_payer_arg())
)
.subcommand(
@@ -183,8 +183,8 @@ impl StakeSubCommands for App<'_, '_> {
"The vote account to which the stake will be delegated")
)
.arg(stake_authority_arg())
.offline_args()
.nonce_args()
.offline_args(false)
.nonce_args(false)
.arg(fee_payer_arg())
)
.subcommand(
@@ -213,8 +213,8 @@ impl StakeSubCommands for App<'_, '_> {
)
.arg(stake_authority_arg())
.arg(withdraw_authority_arg())
.offline_args()
.nonce_args()
.offline_args(false)
.nonce_args(false)
.arg(fee_payer_arg())
)
.subcommand(
@@ -228,8 +228,8 @@ impl StakeSubCommands for App<'_, '_> {
"Stake account to be deactivated. ")
)
.arg(stake_authority_arg())
.offline_args()
.nonce_args()
.offline_args(false)
.nonce_args(false)
.arg(fee_payer_arg())
)
.subcommand(
@@ -268,8 +268,8 @@ impl StakeSubCommands for App<'_, '_> {
.help("Seed for address generation; if specified, the resulting account will be at a derived address of the SPLIT STAKE ACCOUNT pubkey")
)
.arg(stake_authority_arg())
.offline_args()
.nonce_args()
.offline_args(false)
.nonce_args(false)
.arg(fee_payer_arg())
)
.subcommand(
@@ -290,8 +290,8 @@ impl StakeSubCommands for App<'_, '_> {
"Source stake account for the merge. If successful, this stake account will no longer exist after the merge")
)
.arg(stake_authority_arg())
.offline_args()
.nonce_args()
.offline_args(false)
.nonce_args(false)
.arg(fee_payer_arg())
)
.subcommand(
@@ -321,8 +321,8 @@ impl StakeSubCommands for App<'_, '_> {
.help("The amount to withdraw from the stake account, in SOL")
)
.arg(withdraw_authority_arg())
.offline_args()
.nonce_args()
.offline_args(false)
.nonce_args(false)
.arg(fee_payer_arg())
.arg(
Arg::with_name("custodian")
@@ -376,8 +376,8 @@ impl StakeSubCommands for App<'_, '_> {
.validator(is_valid_signer)
.help("Keypair of the existing custodian [default: cli config pubkey]")
)
.offline_args()
.nonce_args()
.offline_args(false)
.nonce_args(false)
.arg(fee_payer_arg())
)
.subcommand(