diff --git a/controller/tests/tx_list_filter.rs b/controller/tests/tx_list_filter.rs index f105a281..7a8dab03 100644 --- a/controller/tests/tx_list_filter.rs +++ b/controller/tests/tx_list_filter.rs @@ -153,7 +153,7 @@ fn test_wallet_tx_filtering( // Amounts let mut tx_query_args = RetrieveTxQueryArgs::default(); - tx_query_args.min_amount_inc = Some(60_000_000_000 - 59_963_300_000); + tx_query_args.min_amount = Some(60_000_000_000 - 59_963_300_000); let tx_results = api .retrieve_txs(mask, true, None, None, Some(tx_query_args))? .1; @@ -161,7 +161,7 @@ fn test_wallet_tx_filtering( // amount, should see as above with coinbases excluded let mut tx_query_args = RetrieveTxQueryArgs::default(); - tx_query_args.min_amount_inc = Some(60_000_000_000 - 59_963_300_000); + tx_query_args.min_amount = Some(60_000_000_000 - 59_963_300_000); tx_query_args.max_amount = Some(60_000_000_000 - 1); let tx_results = api .retrieve_txs(mask, true, None, None, Some(tx_query_args))? @@ -170,7 +170,7 @@ fn test_wallet_tx_filtering( // Amount - should only see coinbase (incoming) let mut tx_query_args = RetrieveTxQueryArgs::default(); - tx_query_args.min_amount_inc = Some(60_000_000_000); + tx_query_args.min_amount = Some(60_000_000_000); let tx_results = api .retrieve_txs(mask, true, None, None, Some(tx_query_args))? .1; diff --git a/libwallet/src/api_impl/types.rs b/libwallet/src/api_impl/types.rs index 64e33ba1..f50bfc48 100644 --- a/libwallet/src/api_impl/types.rs +++ b/libwallet/src/api_impl/types.rs @@ -205,7 +205,7 @@ pub struct RetrieveTxQueryArgs { /// lower bound on the total amount (amount_credited - amount_debited), inclusive #[serde(with = "secp_ser::opt_string_or_u64")] #[serde(default)] - pub min_amount_inc: Option, + pub min_amount: Option, /// higher bound on the total amount (amount_credited - amount_debited), inclusive #[serde(with = "secp_ser::opt_string_or_u64")] #[serde(default)] @@ -238,7 +238,7 @@ impl Default for RetrieveTxQueryArgs { include_received_only: Some(false), include_coinbase_only: Some(false), include_reverted_only: Some(false), - min_amount_inc: None, + min_amount: None, max_amount: None, min_creation_timestamp: None, max_creation_timestamp: None, diff --git a/libwallet/src/internal/updater.rs b/libwallet/src/internal/updater.rs index 8462d37c..c750ac91 100644 --- a/libwallet/src/internal/updater.rs +++ b/libwallet/src/internal/updater.rs @@ -202,7 +202,7 @@ where } }) .filter(|tx_entry| { - if let Some(v) = query_args.min_amount_inc { + if let Some(v) = query_args.min_amount { if tx_entry.tx_type == TxLogEntryType::TxSent || tx_entry.tx_type == TxLogEntryType::TxSentCancelled { @@ -340,7 +340,7 @@ where K: Keychain + 'a, { let mut txs; - // Adding in new tranasction list query logic. If `tx_id` or `tx_slate_id` + // Adding in new transaction list query logic. If `tx_id` or `tx_slate_id` // is provided, then `query_args` is ignored and old logic is followed. if query_args.is_some() && tx_id.is_none() && tx_slate_id.is_none() { txs = apply_advanced_tx_list_filtering(wallet, &query_args.unwrap())