Skip to content

Commit

Permalink
Fix several macro implementation related bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-pease committed Aug 22, 2024
1 parent 9e3486e commit f506dc5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 17 deletions.
1 change: 0 additions & 1 deletion stellar_rust_sdk/src/horizon_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1097,7 +1097,6 @@ impl HorizonClient {
/// # use stellar_rs::operations::prelude::*;
/// # use stellar_rs::models::Request;
/// # use stellar_rs::horizon_client::HorizonClient;
/// # use crate::stellar_rs::Paginatable;
/// #
/// # async fn example() -> Result<(), Box<dyn std::error::Error>> {
/// # let base_url = "https://horizon-testnet.stellar.org".to_string();
Expand Down
8 changes: 5 additions & 3 deletions stellar_rust_sdk/src/operations/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,14 @@ pub mod prelude {
#[cfg(test)]
pub mod tests {
use crate::{
horizon_client,
horizon_client::*,
operations::{
operations_for_account_request::OperationsForAccountRequest,
prelude::{
AllOperationsRequest, OperationsForLedgerRequest, OperationsForLiquidityPoolRequest,
},
AllOperationsRequest,
OperationsForLedgerRequest,
OperationsForLiquidityPoolRequest,
OperationsForTransactionRequest, },
response::{Operation, OperationResponse},
single_operation_request::SingleOperationRequest,
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,15 @@
use stellar_rust_sdk_derive::Pagination;
use crate::Paginatable;
use stellar_rust_sdk_derive::pagination;

use crate::{
models::{Order, Request},
BuildQueryParametersExt,
};

#[derive(Default, Pagination)]
#[pagination]
#[derive(Default)]
pub struct OperationsForTransactionRequest {
/// The hash of the transaction. Optional.
transaction_hash: Option<String>,
/// A number that points to a specific location in a collection of responses and is pulled
/// from the paging_token value of a record.
cursor: Option<u32>,
/// The maximum number of records returned. The limit can range from 1 to 200 - an upper limit
/// that is hardcoded in Horizon for performance reasons. If this argument isn’t designated, it
/// defaults to 10.
limit: Option<u8>,
/// A designation of the [`Order`] in which records should appear. Options include [`Order::Asc`] (ascending)
/// or [`Order::Desc`] (descending). If this argument isn’t set, it defaults to asc.
order: Option<Order>,
}

impl OperationsForTransactionRequest {
Expand Down

0 comments on commit f506dc5

Please sign in to comment.