Skip to content

Commit

Permalink
fix: address review
Browse files Browse the repository at this point in the history
  • Loading branch information
willemneal committed Feb 5, 2024
1 parent 944d2e7 commit f764d4a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
8 changes: 0 additions & 8 deletions cmd/crates/soroban-rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand All @@ -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 }
13 changes: 6 additions & 7 deletions cmd/crates/soroban-rpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ use tokio::time::sleep;
pub mod log;
mod txn;

pub use txn::*;
pub use txn::Assembled;

use soroban_spec_tools::contract;

Expand Down Expand Up @@ -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 {
Expand All @@ -196,11 +196,10 @@ impl GetTransactionResponse {
///
/// # Errors
pub fn events(&self) -> Result<Vec<DiagnosticEvent>, 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)
}

///
Expand Down

0 comments on commit f764d4a

Please sign in to comment.