Skip to content

Commit

Permalink
Fix tx-sitter backwards incompatibility (#748)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dzejkop authored Jun 14, 2024
1 parent 5c6b2a2 commit 69965c8
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions crates/tx-sitter-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,14 @@ impl TxSitterClient {
pub async fn get_txs(&self, tx_status: Option<TxStatus>) -> anyhow::Result<Vec<GetTxResponse>> {
let mut url = format!("{}/txs", self.url);

if let Some(tx_status) = tx_status {
url.push_str(&format!("?status={}", tx_status));
match tx_status {
Some(TxStatus::Unsent) => {
url.push_str("?unsent=true");
}
Some(tx_status) => {
url.push_str(&format!("?status={}", tx_status));
}
None => {}
}

self.json_get(&url).await
Expand Down

0 comments on commit 69965c8

Please sign in to comment.