Skip to content

Commit

Permalink
Use --rpc-header in the rest of the commands
Browse files Browse the repository at this point in the history
  • Loading branch information
elizabethengelman committed Sep 24, 2024
1 parent 1c4af14 commit c6e5ba2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions cmd/crates/soroban-test/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ impl TestEnv {
config::Args {
network: network::Args {
rpc_url: Some(self.rpc_url.clone()),
rpc_header: None,
network_passphrase: Some(LOCAL_NETWORK_PASSPHRASE.to_string()),
network: None,
},
Expand Down
10 changes: 9 additions & 1 deletion cmd/soroban-cli/src/config/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ pub struct Args {
help_heading = HEADING_RPC,
)]
pub rpc_url: Option<String>,
/// Optional RPC provider api key headers
#[arg(
long = "rpc-header",
requires = "rpc_url",
env = "STELLAR_RPC_HEADER",
help_heading = HEADING_RPC,
)]
pub rpc_header: Option<String>,
/// Network passphrase to sign the transaction sent to the rpc server
#[arg(
long = "network-passphrase",
Expand Down Expand Up @@ -79,7 +87,7 @@ impl Args {
{
Ok(Network {
rpc_url,
rpc_header: None, //todo: fix me
rpc_header: self.rpc_header.clone(),
network_passphrase,
})
} else {
Expand Down

0 comments on commit c6e5ba2

Please sign in to comment.