Skip to content

Commit

Permalink
fix: return GetTransactionRaw with getTransaction
Browse files Browse the repository at this point in the history
  • Loading branch information
willemneal committed Jun 12, 2024
1 parent f0799bf commit f61d65d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/crates/stellar-rpc-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ impl Client {

///
/// # Errors
pub async fn get_transaction(&self, tx_id: &Hash) -> Result<GetTransactionResponse, Error> {
pub async fn get_transaction(&self, tx_id: &Hash) -> Result<GetTransactionResponseRaw, Error> {
let mut oparams = ObjectParams::new();
oparams.insert("hash", tx_id)?;
Ok(self.client().request("getTransaction", oparams).await?)
Expand Down Expand Up @@ -827,7 +827,7 @@ impl Client {
let exponential_backoff: f64 = 1.0 / (1.0 - E.powf(-1.0));
let mut sleep_time = Duration::from_secs(1);
loop {
let response = self.get_transaction(tx_id).await?;
let response: GetTransactionResponse = self.get_transaction(tx_id).await?.try_into()?;
match response.status.as_str() {
"SUCCESS" => {
// TODO: the caller should probably be printing this
Expand Down

0 comments on commit f61d65d

Please sign in to comment.