From 478b366519c1a5ff765f16f4a998f954ab0bff3a Mon Sep 17 00:00:00 2001 From: Willem Wyndham Date: Tue, 12 Mar 2024 15:27:17 -0400 Subject: [PATCH] fix: #1251 The issue was that the RPC returned a string with quotes --- cmd/soroban-cli/src/commands/network/mod.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/soroban-cli/src/commands/network/mod.rs b/cmd/soroban-cli/src/commands/network/mod.rs index b4a145f131..15a038ee53 100644 --- a/cmd/soroban-cli/src/commands/network/mod.rs +++ b/cmd/soroban-cli/src/commands/network/mod.rs @@ -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) @@ -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()) })