diff --git a/stellar_rust_sdk/src/assets/mod.rs b/stellar_rust_sdk/src/assets/mod.rs index 650c4ff..13b5596 100644 --- a/stellar_rust_sdk/src/assets/mod.rs +++ b/stellar_rust_sdk/src/assets/mod.rs @@ -98,7 +98,6 @@ pub mod test { static CONTRACTS_AMOUNT: &str = "0.0000000"; static BALANCES_AUTHORIZED: &str = "999.0000000"; static BALANCES_UNAUTHORIZED: &str = "0.0000000"; - static AUTHORIZED_TO_MAINTAIN_LIABILITIES_BALANCES: &str = "0.0000000"; static AUTH_REQUIRED: &bool = &false; static AUTH_REVOCABLE: &bool = &false; static AUTH_IMMUTABLE: &bool = &false; diff --git a/stellar_rust_sdk/src/claimable_balances/mod.rs b/stellar_rust_sdk/src/claimable_balances/mod.rs index 43d9d21..5828ecf 100644 --- a/stellar_rust_sdk/src/claimable_balances/mod.rs +++ b/stellar_rust_sdk/src/claimable_balances/mod.rs @@ -218,8 +218,6 @@ mod tests { static SPONSOR: &str = "GA7UL5DDCP6WR7KV5GXKXSHBMP577U7TBDBTBY33J57RZE2A37KW67JB"; static LAST_MODIFIED_LEDGER: &i64 = &9234; static LAST_MODIFIED_TIME: &str = "2024-06-12T10:19:12Z"; - static DESTINATION: &str = "GDSHZPWSL5QBQKKDQNECFPI2PF7JQUACNWG65PMFOK6G5V4QBH4CX2KH"; - static PREDICATE_UNCONDITIONAL: &bool = &true; static CLAWBACK_ENABLED: &bool = &false; static PAGING_TOKEN: &str = "9234-00000000fe3d8209ed9662e92f0d3a5c55068e18bd5e0697c3c6db6ac4c0870c6f3e0b38"; diff --git a/stellar_rust_sdk/src/ledgers/mod.rs b/stellar_rust_sdk/src/ledgers/mod.rs index 9082ac1..e4e1fc0 100644 --- a/stellar_rust_sdk/src/ledgers/mod.rs +++ b/stellar_rust_sdk/src/ledgers/mod.rs @@ -84,7 +84,6 @@ pub mod prelude { #[cfg(test)] pub mod tests { - use std::hash::Hash; use super::prelude::*; use crate::{horizon_client::HorizonClient, Paginatable}; use base64::{engine::general_purpose, Engine}; @@ -107,10 +106,6 @@ pub mod tests { static BASE_RESERVE_IN_STROOPS: i32 = 100000000; static MAX_TX_SET_SIZE: i32 = 100; static PROTOCOL_VERSION: i32 = 0; - static HEADER_XDR: &str = "AAAAAGPZj1Nu5o0bJ7W4nyOvUxG3Vpok+vFAOtC1K2M7B76ZuZRHr9UdXKbTKiclfOjy72YZFJUkJPVcKT5htvorm1QAAAAAZmi4RwAAAAAAAAABAAAAAKgkzRi8nXUGTSmaW1uspDvDqi8yaTgVPYwvm7XLbfAzAAAAQK2SUxHSetvm4OwtnmhA7Tob9tjNodbrCrdoaxB7z2MIKwTuwuTH8nnbmQQSJ5BbAvGzpj1Dioh+dpbLDakYwQjfP2GYBKkv20BXGS3EPddI6neK3FK8SYzoBSTAFLgRGXNSJ+05hGEpEjdoewhEaqLJsJbgyYpGLa3aVp8F3SSEAAAAAg3gtrOnZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkBfXhAAAAAGQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="; - - let hash = "f96c4021adc1ae496c662f4f97143e499a9548f541c64bb2401a1b1701de5150"; - let prev_hash = "63d98f536ee68d1b27b5b89f23af5311b7569a24faf1403ad0b52b633b07be99"; // Initialize horizon client let horizon_client = @@ -162,10 +157,6 @@ pub mod tests { static MAX_TX_SET_SIZE: &i32 = &100; static PROTOCOL_VERSION: &i32 = &0; - let id = "f96c4021adc1ae496c662f4f97143e499a9548f541c64bb2401a1b1701de5150"; - let hash = "f96c4021adc1ae496c662f4f97143e499a9548f541c64bb2401a1b1701de5150"; - let prev_hash = "63d98f536ee68d1b27b5b89f23af5311b7569a24faf1403ad0b52b633b07be99"; - let closed_at = "2024-02-06T17:32:26Z"; let closed_at_timepoint = 1718138951; // Initialize horizon client @@ -175,7 +166,7 @@ pub mod tests { // construct request let single_ledger_request = SingleLedgerRequest::new().set_sequence(2).unwrap(); - let mut single_ledger_response = horizon_client + let single_ledger_response = horizon_client .get_single_ledger(&single_ledger_request) .await; diff --git a/stellar_rust_sdk/src/operations/mod.rs b/stellar_rust_sdk/src/operations/mod.rs index 99fa0ac..f2a9bd2 100644 --- a/stellar_rust_sdk/src/operations/mod.rs +++ b/stellar_rust_sdk/src/operations/mod.rs @@ -242,7 +242,7 @@ pub mod tests { const ID: &str = "2314987376641"; const PAGING_TOKEN: &str = "2314987376641"; const TRANSACTION_SUCCESFULL: bool = true; - const SOURCE_ACCOUNT: &str = "GBRPYHIL2CI3FNQ4BXLFMNDLFJUNPU2HY3ZMFSHONUCEOASW7QC7OX2H";; + const SOURCE_ACCOUNT: &str = "GBRPYHIL2CI3FNQ4BXLFMNDLFJUNPU2HY3ZMFSHONUCEOASW7QC7OX2H"; const TYPE: &str = "create_account"; const TYPE_I: i64 = 0; const CREATED_AT: &str = "2024-06-11T21:36:12Z"; diff --git a/stellar_rust_sdk/src/order_book/details_request.rs b/stellar_rust_sdk/src/order_book/details_request.rs index 9690ff0..dc9e16c 100644 --- a/stellar_rust_sdk/src/order_book/details_request.rs +++ b/stellar_rust_sdk/src/order_book/details_request.rs @@ -155,11 +155,11 @@ impl Request for DetailsRequest { } mod tests { - use crate::models::Request; - use super::{Asset, AssetType, DetailsRequest}; - + #[test] fn test_details_request() { + use crate::models::Request; + use super::{Asset, AssetType, DetailsRequest}; let details_request = DetailsRequest::new() .set_buying_asset(AssetType::Native) .unwrap() diff --git a/stellar_rust_sdk/src/order_book/mod.rs b/stellar_rust_sdk/src/order_book/mod.rs index cfd55d3..9dd440a 100644 --- a/stellar_rust_sdk/src/order_book/mod.rs +++ b/stellar_rust_sdk/src/order_book/mod.rs @@ -9,25 +9,20 @@ pub mod prelude { } pub mod tests { - use crate::horizon_client; - use crate::order_book::prelude::{Asset, AssetType, DetailsRequest}; - #[tokio::test] async fn get_order_bookdetails() { + use crate::horizon_client; + use crate::order_book::prelude::{Asset, AssetType, DetailsRequest}; + const BIDS_N: &u32 = &6; const BIDS_D: &u32 = &1; const BIDS_PRICE: &str = "6.0000000"; - const BIDS_AMOUNT: &str = "14.2857142"; - const ASKS_N: &u32 = &7; const ASKS_D: &u32 = &1; const ASKS_PRICE: &str = "7.0000000"; - const ASKS_AMOUNT: &str = "99.9999996"; - const BASE_ASSET_TYPE: &str = "native"; const BASE_ASSET_CODE: &str = "IOM"; const BASE_ASSET_ISSUER: &str = "GCDE6MVFIOYF7YZCSVA6V7MDCFTNWMIOF5PQU3DWPH27AHNX4ERY6AKS"; - const COUNTER_ASSET_TYPE: &str = "credit_alphanum4"; let horizon_client = diff --git a/stellar_rust_sdk/src/transactions/mod.rs b/stellar_rust_sdk/src/transactions/mod.rs index c325e91..e076eba 100644 --- a/stellar_rust_sdk/src/transactions/mod.rs +++ b/stellar_rust_sdk/src/transactions/mod.rs @@ -106,9 +106,7 @@ pub mod test { const MEMO_TYPE: &str = "none"; const SIGNATURE: &str = "NUHx9PZlcXQ9mq1lf1usrSTP4/gbxUqzUOQOSU/pQuy9dF7FcUF0fjEbzFECxHUcl4QEfbvyGIE029TA3DrODA=="; const VALID_AFTER: &str = "1970-01-01T00:00:00Z"; - const VALID_BEFORE: &str = "2024-02-06T17:49:24Z"; const MIN_TIME: &str = "0"; - const MAX_TIME: &str = "1707241764"; let horizon_client = HorizonClient::new("https://horizon-testnet.stellar.org"