Skip to content

Commit

Permalink
Add lab_url arg
Browse files Browse the repository at this point in the history
  • Loading branch information
elizabethengelman committed Aug 30, 2024
1 parent a6d8a07 commit 5f4b010
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions cmd/soroban-cli/src/config/sign_with.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 5f4b010

Please sign in to comment.