mirror of
https://github.com/jwinterm/grin-wallet.git
synced 2026-10-17 07:11:36 +02:00
more tweaks based on review
This commit is contained in:
@@ -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<u64>,
|
||||
pub min_amount: Option<u64>,
|
||||
/// 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,
|
||||
|
||||
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user