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

Commit 64bd4c9

Browse files
committed
only parse default keypair source when necessary
1 parent 92d4006 commit 64bd4c9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

token/cli/src/config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,13 +187,13 @@ impl<'a> Config<'a> {
187187
};
188188

189189
let default_keypair = cli_config.keypair_path.clone();
190-
let default_keypair_source =
191-
SignerSource::parse(&default_keypair).unwrap_or_else(print_error_and_exit);
192190
let default_signer: Option<Arc<dyn Signer>> = {
193191
if let Some(source) = matches.try_get_one::<SignerSource>("owner").ok().flatten() {
194192
signer_from_source_with_config(matches, source, "owner", wallet_manager, &config)
195193
.ok()
196194
} else {
195+
let default_keypair_source =
196+
SignerSource::parse(&default_keypair).unwrap_or_else(print_error_and_exit);
197197
signer_from_source_with_config(
198198
matches,
199199
&default_keypair_source,

0 commit comments

Comments
 (0)