diff --git a/cmd/crates/soroban-rpc/Cargo.toml b/cmd/crates/soroban-rpc/Cargo.toml index 08a38817e0..af0256c395 100644 --- a/cmd/crates/soroban-rpc/Cargo.toml +++ b/cmd/crates/soroban-rpc/Cargo.toml @@ -19,17 +19,14 @@ crate-type = ["rlib"] [dependencies] soroban-sdk = { workspace = true } soroban-spec-tools = { workspace = true } - soroban-env-host = { workspace = true } stellar-strkey = { workspace = true } stellar-xdr = { workspace = true, features = ["curr", "std", "serde"] } soroban-spec = { workspace = true } - termcolor = { workspace = true } termcolor_output = { workspace = true } clap = { workspace = true } - serde_json = { workspace = true } serde-aux = { workspace = true } itertools = { workspace = true } @@ -44,16 +41,11 @@ sha2 = { workspace = true } ed25519-dalek = { workspace = true } tracing = { workspace = true } - # networking jsonrpsee-http-client = { workspace = true } jsonrpsee-core = { workspace = true } http = { workspace = true } -# soroban-ledger-snapshot = { workspace = true } -# soroban-sdk = { workspace = true } -# sep5 = { workspace = true } - [dev-dependencies] which = { workspace = true } diff --git a/cmd/crates/soroban-rpc/src/lib.rs b/cmd/crates/soroban-rpc/src/lib.rs index 608c568b5a..fe7bf9f605 100644 --- a/cmd/crates/soroban-rpc/src/lib.rs +++ b/cmd/crates/soroban-rpc/src/lib.rs @@ -185,7 +185,7 @@ impl GetTransactionResponse { if let Some(xdr::TransactionMeta::V3(xdr::TransactionMetaV3 { soroban_meta: Some(xdr::SorobanTransactionMeta { return_value, .. }), .. - })) = self.result_meta.as_ref() + })) = &self.result_meta { Ok(return_value.clone()) } else { @@ -196,11 +196,10 @@ impl GetTransactionResponse { /// /// # Errors pub fn events(&self) -> Result, Error> { - if let Some(meta) = self.result_meta.as_ref() { - Ok(extract_events(meta)) - } else { - Err(Error::MissingOp) - } + self.result_meta + .as_ref() + .map(extract_events) + .ok_or(Error::MissingOp) } ///