Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit c245380

Browse files
committed
Formatting
1 parent 759c4a7 commit c245380

File tree

2 files changed

+25
-25
lines changed

2 files changed

+25
-25
lines changed

token/cli/src/config.rs

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -260,30 +260,29 @@ impl<'a> Config<'a> {
260260
let dump_transaction_message = matches.is_present(DUMP_TRANSACTION_MESSAGE.name);
261261

262262
let default_program_id = spl_token::id();
263-
let (program_id, restrict_to_program_id) =
264-
if matches.is_present("program_2022") {
265-
(spl_token_2022::id(), true)
266-
} else if let Some(program_id) = value_of(matches, "program_id") {
267-
(program_id, true)
268-
} else if !sign_only {
269-
if let Some(address) = value_of(matches, "token")
270-
.or_else(|| value_of(matches, "account"))
271-
.or_else(|| value_of(matches, "address"))
272-
{
273-
(
274-
rpc_client
275-
.get_account(&address)
276-
.await
277-
.map(|account| account.owner)
278-
.unwrap_or(default_program_id),
279-
false,
280-
)
281-
} else {
282-
(default_program_id, false)
283-
}
263+
let (program_id, restrict_to_program_id) = if matches.is_present("program_2022") {
264+
(spl_token_2022::id(), true)
265+
} else if let Some(program_id) = value_of(matches, "program_id") {
266+
(program_id, true)
267+
} else if !sign_only {
268+
if let Some(address) = value_of(matches, "token")
269+
.or_else(|| value_of(matches, "account"))
270+
.or_else(|| value_of(matches, "address"))
271+
{
272+
(
273+
rpc_client
274+
.get_account(&address)
275+
.await
276+
.map(|account| account.owner)
277+
.unwrap_or(default_program_id),
278+
false,
279+
)
284280
} else {
285281
(default_program_id, false)
286-
};
282+
}
283+
} else {
284+
(default_program_id, false)
285+
};
287286

288287
// need to specify a compute limit if compute price and blockhash are specified
289288
if matches.is_present(BLOCKHASH_ARG.name)

token/cli/tests/command.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -505,9 +505,9 @@ async fn create_token_2022(test_validator: &TestValidator, payer: &Keypair) {
505505
let args = &[
506506
"spl-token",
507507
CommandName::CreateToken.into(),
508-
"--program-2022"
508+
"--program-2022",
509509
];
510-
510+
511511
let default_decimals = format!("{}", spl_token_2022::native_mint::DECIMALS);
512512
let minimum_signers_help = minimum_signers_help_string();
513513
let multisig_member_help = multisig_member_help_string();
@@ -527,7 +527,8 @@ async fn create_token_2022(test_validator: &TestValidator, payer: &Keypair) {
527527
config.rpc_client.clone(),
528528
config.program_client.clone(),
529529
config.websocket_url.clone(),
530-
).await;
530+
)
531+
.await;
531532

532533
assert_eq!(config.program_id, spl_token_2022::ID);
533534
}

0 commit comments

Comments
 (0)