From 741ad29330c72611bc622a3e7af8b33e616c6fab Mon Sep 17 00:00:00 2001 From: Elizabeth Engelman <4752801+elizabethengelman@users.noreply.github.com> Date: Fri, 20 Sep 2024 16:37:05 -0400 Subject: [PATCH] Use --rpc-header in the rest of the commands --- cmd/soroban-cli/src/config/network.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cmd/soroban-cli/src/config/network.rs b/cmd/soroban-cli/src/config/network.rs index 32699900ca..a395fd9c4d 100644 --- a/cmd/soroban-cli/src/config/network.rs +++ b/cmd/soroban-cli/src/config/network.rs @@ -47,6 +47,14 @@ pub struct Args { help_heading = HEADING_RPC, )] pub rpc_url: Option, + /// 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, /// Network passphrase to sign the transaction sent to the rpc server #[arg( long = "network-passphrase", @@ -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 {