Reorder arguments to avoid structopt order issues when parsing mandatory arguments
@@ -22,10 +22,6 @@ use structopt::StructOpt;
#[derive(StructOpt)]
#[structopt(rename_all = "kebab-case")]
pub struct MakeTransaction {
- /// the file path to the file to read the signing key from.
- /// If omitted it will be read from the standard input.
- pub secret: Option<PathBuf>,
-
/// the account to debit the funds from
#[structopt(name = "ACCOUNT")]
pub sender_account: interfaces::Address,
@@ -34,16 +30,20 @@ pub struct MakeTransaction {
#[structopt(name = "VALUE")]
pub value: interfaces::Value,
- #[structopt(flatten)]
- pub common: common::CommonTransaction,
+ pub block0_hash: String,
- #[structopt(flatten)]
- pub fee: common::CommonFees,
+ /// the file path to the file to read the signing key from.
+ /// If omitted it will be read from the standard input.
+ pub secret: Option<PathBuf>,
/// Set the change in the given address
pub change: Option<interfaces::Address>,
- pub block0_hash: String,
+ #[structopt(flatten)]
+ pub common: common::CommonTransaction,
+
+ #[structopt(flatten)]
+ pub fee: common::CommonFees,
#[structopt(flatten)]
rest_args: RestArgs,
