Skip to content

Commit

Permalink
Fix operations int test
Browse files Browse the repository at this point in the history
  • Loading branch information
elizabethengelman committed Dec 18, 2024
1 parent e417f10 commit dd83fc2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 26 deletions.
20 changes: 5 additions & 15 deletions cmd/crates/soroban-test/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,8 @@ impl TestEnv {
}

pub fn with_rpc_url(rpc_url: &str) -> TestEnv {
let mut env = TestEnv {
network: network::Network {
rpc_url: rpc_url.to_string(),
..Default::default()
},
..Default::default()
};
let mut env: TestEnv = Default::default();
env.network.rpc_url = rpc_url.to_string();
if let Ok(network_passphrase) = std::env::var("STELLAR_NETWORK_PASSPHRASE") {
env.network.network_passphrase = network_passphrase;
};
Expand All @@ -119,14 +114,9 @@ impl TestEnv {
}

pub fn with_rpc_provider(rpc_url: &str, rpc_headers: Vec<(String, String)>) -> TestEnv {
let mut env = TestEnv {
network: network::Network {
rpc_url: rpc_url.to_string(),
rpc_headers,
..Default::default()
},
..Default::default()
};
let mut env: TestEnv = Default::default();
env.network.rpc_url = rpc_url.to_string();
env.network.rpc_headers = rpc_headers;
if let Ok(network_passphrase) = std::env::var("STELLAR_NETWORK_PASSPHRASE") {
env.network.network_passphrase = network_passphrase;
};
Expand Down
11 changes: 0 additions & 11 deletions cmd/soroban-cli/src/config/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,17 +231,6 @@ impl Network {
}
}

impl Default for Network {
fn default() -> Self {
let testnet_default = DEFAULTS["testnet"];
Network {
rpc_url: testnet_default.0.to_string(),
rpc_headers: Vec::new(),
network_passphrase: testnet_default.1.to_string(),
}
}
}

pub static DEFAULTS: phf::Map<&'static str, (&'static str, &'static str)> = phf_map! {
"local" => (
"http://localhost:8000/rpc",
Expand Down

0 comments on commit dd83fc2

Please sign in to comment.