Skip to content

Commit

Permalink
Merge pull request #1626 from zancas/responsiveness
Browse files Browse the repository at this point in the history
Responsiveness
  • Loading branch information
juanky201271 authored Jan 21, 2025
2 parents 726839d + a028ad3 commit cfaf278
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions zingolib/src/lightclient/describe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -583,8 +583,10 @@ impl LightClient {
}

/// TODO: doc comment
pub async fn value_transfers_json_string(&self) -> String {
json::JsonValue::from(self.sorted_value_transfers(true).await).pretty(2)
pub async fn value_transfers_json_string(&self, recent_vts_to_retrieve: usize) -> String {
let sorted_vts = self.sorted_value_transfers(true).await;
let subset = &sorted_vts.as_slice()[..recent_vts_to_retrieve];
json::JsonValue::from(subset).pretty(2)
}

/// Provides a list of transaction summaries related to this wallet in order of blockheight
Expand Down
2 changes: 1 addition & 1 deletion zingolib/src/wallet/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ pub mod summaries {

/// A value transfer is a note group abstraction.
/// A group of all notes sent to a specific address in a transaction.
#[derive(PartialEq)]
#[derive(Clone, PartialEq)]
pub struct ValueTransfer {
txid: TxId,
datetime: u64,
Expand Down

0 comments on commit cfaf278

Please sign in to comment.