Skip to content

Commit 24ccf9c

Browse files
committed
f Use Txid::from_str
1 parent e8476bc commit 24ccf9c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/async.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ impl AsyncClient {
100100
return Ok(None);
101101
}
102102

103-
Ok(Some(deserialize(&Vec::from_hex(&resp.text().await?)?)?))
103+
Ok(Some(Txid::from_str(&resp.text().await?)?))
104104
}
105105

106106
/// Get the status of a [`Transaction`] given its [`Txid`].

src/blocking.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ impl BlockingClient {
101101
.call();
102102

103103
match resp {
104-
Ok(resp) => Ok(Some(deserialize(&Vec::from_hex(&resp.into_string()?)?)?)),
104+
Ok(resp) => Ok(Some(Txid::from_str(&resp.into_string()?)?)),
105105
Err(ureq::Error::Status(code, _)) => {
106106
if is_status_not_found(code) {
107107
return Ok(None);

0 commit comments

Comments
 (0)