Skip to content

Commit

Permalink
Fix WalletClient::get_transfers with Out=true in Category Selector (#127
Browse files Browse the repository at this point in the history
)

* Update models.rs

Convert GotTransfer::suggested_confirmations_threshold to Option<u64> from u64 to enable Wallet.gettransfers(...) with Out: true in the Category Selector

* Update all_clients_interaction.rs

update test

---------

Co-authored-by: h4sh3d <h4sh3d@protonmail.com>
  • Loading branch information
bytenotbark and h4sh3d authored May 30, 2024
1 parent dcf5fd9 commit 519878d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ pub struct GotTransfer {
/// JSON object containing the major & minor subaddress index.
pub subaddr_index: subaddress::Index,
/// Estimation of the confirmations needed for the transaction to be included in a block.
pub suggested_confirmations_threshold: u64,
pub suggested_confirmations_threshold: Option<u64>,
/// POSIX timestamp for when this transfer was first confirmed in a block (or timestamp submission if not mined yet).
#[serde(with = "chrono::serde::ts_seconds")]
pub timestamp: DateTime<Utc>,
Expand Down
2 changes: 1 addition & 1 deletion tests/clients_tests/all_clients_interaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ pub async fn run() {
note: "".to_string(),
payment_id: HashString(PaymentId::zero()),
subaddr_index: Index { major: 0, minor: 0 },
suggested_confirmations_threshold: 1,
suggested_confirmations_threshold: Some(1),
// this is any date, since it will not be tested against anything
timestamp: DateTime::from_naive_utc_and_offset(
NaiveDateTime::from_timestamp_opt(0, 0).unwrap(),
Expand Down

0 comments on commit 519878d

Please sign in to comment.