From b886c7622d40f20da724abcdaa5b22d7e6f4798b Mon Sep 17 00:00:00 2001 From: Kevin Pease Date: Thu, 22 Aug 2024 15:48:27 +0200 Subject: [PATCH] Fix several macro implementation related bugs --- stellar_rust_sdk/src/horizon_client.rs | 1 - stellar_rust_sdk/src/operations/mod.rs | 8 +++++--- .../operations_for_transaction_request.rs | 16 +++------------- 3 files changed, 8 insertions(+), 17 deletions(-) diff --git a/stellar_rust_sdk/src/horizon_client.rs b/stellar_rust_sdk/src/horizon_client.rs index b324251..cbce99f 100644 --- a/stellar_rust_sdk/src/horizon_client.rs +++ b/stellar_rust_sdk/src/horizon_client.rs @@ -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> { /// # let base_url = "https://horizon-testnet.stellar.org".to_string(); diff --git a/stellar_rust_sdk/src/operations/mod.rs b/stellar_rust_sdk/src/operations/mod.rs index b102b73..d930e0c 100644 --- a/stellar_rust_sdk/src/operations/mod.rs +++ b/stellar_rust_sdk/src/operations/mod.rs @@ -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, }, diff --git a/stellar_rust_sdk/src/operations/operations_for_transaction_request.rs b/stellar_rust_sdk/src/operations/operations_for_transaction_request.rs index ce9b97e..efe4d42 100644 --- a/stellar_rust_sdk/src/operations/operations_for_transaction_request.rs +++ b/stellar_rust_sdk/src/operations/operations_for_transaction_request.rs @@ -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, - /// 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, - /// 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, - /// 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, } impl OperationsForTransactionRequest {