Skip to content

Commit

Permalink
Make get_address_txns more consistent with other similar functions
Browse files Browse the repository at this point in the history
  • Loading branch information
praveenperera committed Oct 15, 2024
1 parent 3c5eec6 commit 336d1c1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/async.rs
Original file line number Diff line number Diff line change
Expand Up @@ -389,13 +389,13 @@ impl AsyncClient {

/// Get transaction history for the specified address/scripthash, sorted with newest first.
/// Returns up to 50 mempool transactions plus the first 25 confirmed transactions.
/// You can request more confirmed transactions using an after_txid parameter.
/// More can be requested by specifying the last txid seen by the previous query.
pub async fn get_address_txns(
&self,
address: &Address,
after_txid: Option<Txid>,
last_seen: Option<Txid>,
) -> Result<Vec<Tx>, Error> {
let path = match after_txid {
let path = match last_seen {
Some(after_txid) => format!("/address/{address}/txs/chain/{after_txid}"),
None => format!("/address/{address}/txs"),
};
Expand Down
6 changes: 3 additions & 3 deletions src/blocking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -328,13 +328,13 @@ impl BlockingClient {

/// Get transaction history for the specified address/scripthash, sorted with newest first.
/// Returns up to 50 mempool transactions plus the first 25 confirmed transactions.
/// You can request more confirmed transactions using an after_txid parameter.
/// More can be requested by specifying the last txid seen by the previous query.
pub fn get_address_txns(
&self,
address: &Address,
after_txid: Option<Txid>,
last_seen: Option<Txid>,
) -> Result<Vec<Tx>, Error> {
let path = match after_txid {
let path = match last_seen {
Some(after_txid) => format!("/address/{address}/txs/chain/{after_txid}"),
None => format!("/address/{address}/txs"),
};
Expand Down

0 comments on commit 336d1c1

Please sign in to comment.