Skip to content

Commit

Permalink
clippy, fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Fraccaman committed Jul 5, 2023
1 parent e4e58ef commit 6c25dde
Show file tree
Hide file tree
Showing 6 changed files with 385 additions and 247 deletions.
30 changes: 17 additions & 13 deletions apps/src/lib/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1935,7 +1935,8 @@ pub mod args {
pub const VALIDATOR_CODE_PATH: ArgOpt<PathBuf> =
arg_opt("validator-code-path");
pub const VALUE: ArgOpt<String> = arg_opt("value");
pub const VERIFICATION_KEY: ArgOpt<WalletPublicKey> = arg_opt("verification-key");
pub const VERIFICATION_KEY: ArgOpt<WalletPublicKey> =
arg_opt("verification-key");
pub const VIEWING_KEY: Arg<WalletViewingKey> = arg("key");
pub const WALLET_ALIAS_FORCE: ArgFlag = flag("wallet-alias-force");
pub const WASM_CHECKSUMS_PATH: Arg<PathBuf> = arg("wasm-checksums-path");
Expand Down Expand Up @@ -3341,12 +3342,15 @@ pub mod args {
fee_token: ctx.get(&self.fee_token),
gas_limit: self.gas_limit,
signing_key: self.signing_key.map(|x| ctx.get_cached(&x)),
verification_key: self.verification_key.map(|x| ctx.get_cached(&x)),
verification_key: self
.verification_key
.map(|x| ctx.get_cached(&x)),
signer: self.signer.map(|x| ctx.get(&x)),
tx_reveal_code_path: self.tx_reveal_code_path,
password: self.password,
expiration: self.expiration,
chain_id: self.chain_id
chain_id: self
.chain_id
.or_else(|| Some(ctx.config.ledger.chain_id.clone())),
}
}
Expand Down Expand Up @@ -3419,16 +3423,16 @@ pub mod args {
.conflicts_with(SIGNING_KEY_OPT.name)
.conflicts_with(VERIFICATION_KEY.name),
)
.arg(
VERIFICATION_KEY
.def()
.about(
"Sign the transaction with the key for the given \
public key, public key hash or alias from your \
wallet.",
)
.conflicts_with(SIGNER.name)
.conflicts_with(SIGNING_KEY_OPT.name),
.arg(
VERIFICATION_KEY
.def()
.help(
"Sign the transaction with the key for the given \
public key, public key hash or alias from your \
wallet.",
)
.conflicts_with(SIGNER.name)
.conflicts_with(SIGNING_KEY_OPT.name),
)
.arg(CHAIN_ID_OPT.def().help("The chain ID."))
}
Expand Down
11 changes: 2 additions & 9 deletions apps/src/lib/client/signing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ pub async fn find_pk<
wallet: &mut Wallet<U>,
addr: &Address,
) -> Result<common::PublicKey, tx::Error> {
namada::ledger::signing::find_pk(client, wallet, addr, None)
.await
namada::ledger::signing::find_pk(client, wallet, addr, None).await
}

/// Given CLI arguments and some defaults, determine the rightful transaction
Expand Down Expand Up @@ -60,13 +59,7 @@ pub async fn sign_tx<
args: &args::Tx,
default: &common::PublicKey,
) -> Result<(), tx::Error> {
namada::ledger::signing::sign_tx(
wallet,
tx,
args,
default,
)
.await
namada::ledger::signing::sign_tx(wallet, tx, args, default).await
}

/// Create a wrapper tx from a normal tx. Get the hash of the
Expand Down
Loading

0 comments on commit 6c25dde

Please sign in to comment.