From f7ad2c2679d30b48a5d8bea6342fe416a04cf20c Mon Sep 17 00:00:00 2001 From: Willem Wyndham Date: Sat, 25 Nov 2023 18:31:40 -0500 Subject: [PATCH] feat!(CLI) require source account --- cmd/soroban-cli/src/commands/config/mod.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/cmd/soroban-cli/src/commands/config/mod.rs b/cmd/soroban-cli/src/commands/config/mod.rs index 72c6f8aed9..eaa63aa587 100644 --- a/cmd/soroban-cli/src/commands/config/mod.rs +++ b/cmd/soroban-cli/src/commands/config/mod.rs @@ -37,7 +37,7 @@ pub struct Args { #[arg(long, visible_alias = "source", env = "SOROBAN_ACCOUNT")] /// Account that signs the final transaction. Alias `source`. Can be an identity (--source alice), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). Default: `identity generate --default-seed` - pub source_account: Option, + pub source_account: String, #[arg(long)] /// If using a seed phrase, which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` @@ -49,12 +49,7 @@ pub struct Args { impl Args { pub fn key_pair(&self) -> Result { - let key = if let Some(source_account) = &self.source_account { - self.account(source_account)? - } else { - secret::Secret::test_seed_phrase()? - }; - + let key = self.account(&self.source_account)?; Ok(key.key_pair(self.hd_path)?) }