From 5f4b01070724edce2a4fe9e6824363a9a241dba7 Mon Sep 17 00:00:00 2001 From: Elizabeth Engelman <4752801+elizabethengelman@users.noreply.github.com> Date: Fri, 30 Aug 2024 12:08:06 -0400 Subject: [PATCH] Add lab_url arg --- cmd/soroban-cli/src/config/sign_with.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/cmd/soroban-cli/src/config/sign_with.rs b/cmd/soroban-cli/src/config/sign_with.rs index 26b6917104..ff75e9823e 100644 --- a/cmd/soroban-cli/src/config/sign_with.rs +++ b/cmd/soroban-cli/src/config/sign_with.rs @@ -49,6 +49,14 @@ pub struct Args { hide = true )] pub sign_with_lab: bool, + /// Lab URL for sign_with_lab + #[arg( + long, + env = "STELLAR_SIGN_WITH_LAB_URL", + hide = true, + default_value = "https://lab.stellar.org/transaction/sign?" + )] + pub lab_url: String, #[arg(long, conflicts_with = "sign_with_lab")] /// If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` @@ -98,8 +106,7 @@ impl Args { .to_xdr_base64(Limits::none()) .expect("Failed to write XDR"); - let base_url = "http://localhost:3000/transaction/sign?"; - let mut url = Url::parse(base_url).unwrap(); + let mut url = Url::parse(&self.lab_url).unwrap(); url.query_pairs_mut() .append_pair("networkPassphrase", &passphrase) .append_pair("xdr", &xdr_buffer);