Make hypen/underscore consistent
This commit is contained in:
@ -160,7 +160,7 @@ fn main() -> Result<(), Box<dyn error::Error>> {
|
|||||||
SubCommand::with_name("cancel")
|
SubCommand::with_name("cancel")
|
||||||
.about("Cancel a transfer")
|
.about("Cancel a transfer")
|
||||||
.arg(
|
.arg(
|
||||||
Arg::with_name("process-id")
|
Arg::with_name("process_id")
|
||||||
.index(1)
|
.index(1)
|
||||||
.value_name("PROCESS_ID")
|
.value_name("PROCESS_ID")
|
||||||
.takes_value(true)
|
.takes_value(true)
|
||||||
@ -208,7 +208,7 @@ fn main() -> Result<(), Box<dyn error::Error>> {
|
|||||||
SubCommand::with_name("create-staking-account")
|
SubCommand::with_name("create-staking-account")
|
||||||
.about("Create staking account for node")
|
.about("Create staking account for node")
|
||||||
.arg(
|
.arg(
|
||||||
Arg::with_name("voting-account-id")
|
Arg::with_name("voting_account_id")
|
||||||
.index(1)
|
.index(1)
|
||||||
.value_name("PUBKEY")
|
.value_name("PUBKEY")
|
||||||
.takes_value(true)
|
.takes_value(true)
|
||||||
@ -228,7 +228,7 @@ fn main() -> Result<(), Box<dyn error::Error>> {
|
|||||||
SubCommand::with_name("deploy")
|
SubCommand::with_name("deploy")
|
||||||
.about("Deploy a program")
|
.about("Deploy a program")
|
||||||
.arg(
|
.arg(
|
||||||
Arg::with_name("program-location")
|
Arg::with_name("program_location")
|
||||||
.index(1)
|
.index(1)
|
||||||
.value_name("PATH")
|
.value_name("PATH")
|
||||||
.takes_value(true)
|
.takes_value(true)
|
||||||
@ -266,7 +266,7 @@ fn main() -> Result<(), Box<dyn error::Error>> {
|
|||||||
.help("A timestamp after which transaction will execute"),
|
.help("A timestamp after which transaction will execute"),
|
||||||
)
|
)
|
||||||
.arg(
|
.arg(
|
||||||
Arg::with_name("timestamp-pubkey")
|
Arg::with_name("timestamp_pubkey")
|
||||||
.long("require-timestamp-from")
|
.long("require-timestamp-from")
|
||||||
.value_name("PUBKEY")
|
.value_name("PUBKEY")
|
||||||
.takes_value(true)
|
.takes_value(true)
|
||||||
@ -300,7 +300,7 @@ fn main() -> Result<(), Box<dyn error::Error>> {
|
|||||||
.help("The pubkey of recipient"),
|
.help("The pubkey of recipient"),
|
||||||
)
|
)
|
||||||
.arg(
|
.arg(
|
||||||
Arg::with_name("process-id")
|
Arg::with_name("process_id")
|
||||||
.index(2)
|
.index(2)
|
||||||
.value_name("PROCESS_ID")
|
.value_name("PROCESS_ID")
|
||||||
.takes_value(true)
|
.takes_value(true)
|
||||||
@ -320,7 +320,7 @@ fn main() -> Result<(), Box<dyn error::Error>> {
|
|||||||
.help("The pubkey of recipient"),
|
.help("The pubkey of recipient"),
|
||||||
)
|
)
|
||||||
.arg(
|
.arg(
|
||||||
Arg::with_name("process-id")
|
Arg::with_name("process_id")
|
||||||
.index(2)
|
.index(2)
|
||||||
.value_name("PROCESS_ID")
|
.value_name("PROCESS_ID")
|
||||||
.takes_value(true)
|
.takes_value(true)
|
||||||
|
@ -143,7 +143,7 @@ pub fn parse_command(
|
|||||||
}
|
}
|
||||||
("balance", Some(_balance_matches)) => Ok(WalletCommand::Balance),
|
("balance", Some(_balance_matches)) => Ok(WalletCommand::Balance),
|
||||||
("cancel", Some(cancel_matches)) => {
|
("cancel", Some(cancel_matches)) => {
|
||||||
let pubkey_vec = bs58::decode(cancel_matches.value_of("process-id").unwrap())
|
let pubkey_vec = bs58::decode(cancel_matches.value_of("process_id").unwrap())
|
||||||
.into_vec()
|
.into_vec()
|
||||||
.expect("base58-encoded public key");
|
.expect("base58-encoded public key");
|
||||||
|
|
||||||
@ -193,7 +193,7 @@ pub fn parse_command(
|
|||||||
))
|
))
|
||||||
}
|
}
|
||||||
("create-staking-account", Some(staking_matches)) => {
|
("create-staking-account", Some(staking_matches)) => {
|
||||||
let voting_account_string = staking_matches.value_of("voting-account-id").unwrap();
|
let voting_account_string = staking_matches.value_of("voting_account_id").unwrap();
|
||||||
let voting_account_vec = bs58::decode(voting_account_string)
|
let voting_account_vec = bs58::decode(voting_account_string)
|
||||||
.into_vec()
|
.into_vec()
|
||||||
.expect("base58-encoded public key");
|
.expect("base58-encoded public key");
|
||||||
@ -211,7 +211,7 @@ pub fn parse_command(
|
|||||||
}
|
}
|
||||||
("deploy", Some(deploy_matches)) => Ok(WalletCommand::Deploy(
|
("deploy", Some(deploy_matches)) => Ok(WalletCommand::Deploy(
|
||||||
deploy_matches
|
deploy_matches
|
||||||
.value_of("program-location")
|
.value_of("program_location")
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.to_string(),
|
.to_string(),
|
||||||
)),
|
)),
|
||||||
@ -244,8 +244,8 @@ pub fn parse_command(
|
|||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
};
|
};
|
||||||
let timestamp_pubkey = if pay_matches.is_present("timestamp-pubkey") {
|
let timestamp_pubkey = if pay_matches.is_present("timestamp_pubkey") {
|
||||||
let pubkey_vec = bs58::decode(pay_matches.value_of("timestamp-pubkey").unwrap())
|
let pubkey_vec = bs58::decode(pay_matches.value_of("timestamp_pubkey").unwrap())
|
||||||
.into_vec()
|
.into_vec()
|
||||||
.expect("base58-encoded public key");
|
.expect("base58-encoded public key");
|
||||||
|
|
||||||
@ -305,7 +305,7 @@ pub fn parse_command(
|
|||||||
}
|
}
|
||||||
let to = Pubkey::new(&pubkey_vec);
|
let to = Pubkey::new(&pubkey_vec);
|
||||||
|
|
||||||
let pubkey_vec = bs58::decode(sig_matches.value_of("process-id").unwrap())
|
let pubkey_vec = bs58::decode(sig_matches.value_of("process_id").unwrap())
|
||||||
.into_vec()
|
.into_vec()
|
||||||
.expect("base58-encoded public key");
|
.expect("base58-encoded public key");
|
||||||
|
|
||||||
@ -327,7 +327,7 @@ pub fn parse_command(
|
|||||||
}
|
}
|
||||||
let to = Pubkey::new(&pubkey_vec);
|
let to = Pubkey::new(&pubkey_vec);
|
||||||
|
|
||||||
let pubkey_vec = bs58::decode(timestamp_matches.value_of("process-id").unwrap())
|
let pubkey_vec = bs58::decode(timestamp_matches.value_of("process_id").unwrap())
|
||||||
.into_vec()
|
.into_vec()
|
||||||
.expect("base58-encoded public key");
|
.expect("base58-encoded public key");
|
||||||
|
|
||||||
@ -1104,7 +1104,7 @@ mod tests {
|
|||||||
SubCommand::with_name("cancel")
|
SubCommand::with_name("cancel")
|
||||||
.about("Cancel a transfer")
|
.about("Cancel a transfer")
|
||||||
.arg(
|
.arg(
|
||||||
Arg::with_name("process-id")
|
Arg::with_name("process_id")
|
||||||
.index(1)
|
.index(1)
|
||||||
.value_name("PROCESS_ID")
|
.value_name("PROCESS_ID")
|
||||||
.takes_value(true)
|
.takes_value(true)
|
||||||
@ -1152,7 +1152,7 @@ mod tests {
|
|||||||
SubCommand::with_name("create-staking-account")
|
SubCommand::with_name("create-staking-account")
|
||||||
.about("Create staking account for node")
|
.about("Create staking account for node")
|
||||||
.arg(
|
.arg(
|
||||||
Arg::with_name("voting-account-id")
|
Arg::with_name("voting_account_id")
|
||||||
.index(1)
|
.index(1)
|
||||||
.value_name("PUBKEY")
|
.value_name("PUBKEY")
|
||||||
.takes_value(true)
|
.takes_value(true)
|
||||||
@ -1172,7 +1172,7 @@ mod tests {
|
|||||||
SubCommand::with_name("deploy")
|
SubCommand::with_name("deploy")
|
||||||
.about("Deploy a program")
|
.about("Deploy a program")
|
||||||
.arg(
|
.arg(
|
||||||
Arg::with_name("program-location")
|
Arg::with_name("program_location")
|
||||||
.index(1)
|
.index(1)
|
||||||
.value_name("PATH")
|
.value_name("PATH")
|
||||||
.takes_value(true)
|
.takes_value(true)
|
||||||
@ -1211,7 +1211,7 @@ mod tests {
|
|||||||
.help("A timestamp after which transaction will execute"),
|
.help("A timestamp after which transaction will execute"),
|
||||||
)
|
)
|
||||||
.arg(
|
.arg(
|
||||||
Arg::with_name("timestamp-pubkey")
|
Arg::with_name("timestamp_pubkey")
|
||||||
.long("require-timestamp-from")
|
.long("require-timestamp-from")
|
||||||
.value_name("PUBKEY")
|
.value_name("PUBKEY")
|
||||||
.takes_value(true)
|
.takes_value(true)
|
||||||
@ -1245,7 +1245,7 @@ mod tests {
|
|||||||
.help("The pubkey of recipient"),
|
.help("The pubkey of recipient"),
|
||||||
)
|
)
|
||||||
.arg(
|
.arg(
|
||||||
Arg::with_name("process-id")
|
Arg::with_name("process_id")
|
||||||
.index(2)
|
.index(2)
|
||||||
.value_name("PROCESS_ID")
|
.value_name("PROCESS_ID")
|
||||||
.takes_value(true)
|
.takes_value(true)
|
||||||
@ -1265,7 +1265,7 @@ mod tests {
|
|||||||
.help("The pubkey of recipient"),
|
.help("The pubkey of recipient"),
|
||||||
)
|
)
|
||||||
.arg(
|
.arg(
|
||||||
Arg::with_name("process-id")
|
Arg::with_name("process_id")
|
||||||
.index(2)
|
.index(2)
|
||||||
.value_name("PROCESS_ID")
|
.value_name("PROCESS_ID")
|
||||||
.takes_value(true)
|
.takes_value(true)
|
||||||
|
Reference in New Issue
Block a user