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

Commit ae6082d

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

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

token/cli/src/config.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -186,17 +186,15 @@ impl<'a> Config<'a> {
186186
allow_null_signer: !multisigner_pubkeys.is_empty(),
187187
};
188188

189-
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);
192189
let default_signer: Option<Arc<dyn Signer>> = {
193190
if let Some(source) = matches.try_get_one::<SignerSource>("owner").ok().flatten() {
194191
signer_from_source_with_config(matches, source, "owner", wallet_manager, &config)
195192
.ok()
196193
} else {
197-
signer_from_source_with_config(
194+
let default_keypair = cli_config.keypair_path.clone();
195+
signer_from_path_with_config(
198196
matches,
199-
&default_keypair_source,
197+
&default_keypair,
200198
"default",
201199
wallet_manager,
202200
&config,

0 commit comments

Comments
 (0)