diff --git a/token/cli/src/config.rs b/token/cli/src/config.rs index 72be7f30495..adc405c97e6 100644 --- a/token/cli/src/config.rs +++ b/token/cli/src/config.rs @@ -187,13 +187,13 @@ impl<'a> Config<'a> { }; let default_keypair = cli_config.keypair_path.clone(); - let default_keypair_source = - SignerSource::parse(&default_keypair).unwrap_or_else(print_error_and_exit); let default_signer: Option> = { if let Some(source) = matches.try_get_one::("owner").ok().flatten() { signer_from_source_with_config(matches, source, "owner", wallet_manager, &config) .ok() } else { + let default_keypair_source = + SignerSource::parse(&default_keypair).unwrap_or_else(print_error_and_exit); signer_from_source_with_config( matches, &default_keypair_source,