Skip to content

Commit

Permalink
fix: #1251
Browse files Browse the repository at this point in the history
The issue was that the RPC returned a string with quotes
  • Loading branch information
willemneal committed Mar 12, 2024
1 parent 5acdda2 commit 478b366
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cmd/soroban-cli/src/commands/network/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ impl Network {
if self.network_passphrase.as_str() == LOCAL_NETWORK_PASSPHRASE {
let auth = rpc_uri.authority().unwrap().clone();
let scheme = rpc_uri.scheme_str().unwrap();
// format!("{scheme}://{auth}/friendbot");
Ok(Uri::builder()
.authority(auth)
.scheme(scheme)
Expand All @@ -181,7 +180,7 @@ impl Network {
} else {
let client = Client::new(&self.rpc_url)?;
let uri = client.friendbot_url().await?;
Uri::from_str(&format!("{uri:?}?addr={addr}")).map_err(|e| {
Uri::from_str(&format!("{}?addr={addr}", uri.trim_matches('"'))).map_err(|e| {
tracing::error!("{e}");
Error::InvalidUrl(uri.to_string())
})
Expand Down

0 comments on commit 478b366

Please sign in to comment.